This question already has an answer here:
I had a job interview today for a software development job as a Junior Developer as it was down to me and another girl, the outcome of the interview was that the girl had one years more experience than me so he choose her. I thanked him for his time and for being straight up about his decision, he told me that they are expanding and will keep ahold of my details.
After the interview on my way home I though of some advice that would have been helpful that I could have asked him and that question was "Do you have any feedback about how the interview went or things that I could improve on".
Would it be ok to send him an email and ask that question from a professional stand point?