I disagree with Starman to a degree. Here is a question for you guys: what do most men ask when they want to know if she is available? Most guys ask, "Do you have a boyfriend?" And I think asking this, a guy can come off as desperate and needy because you assume she does by asking that, but asking, "Are you single?" is completely different because it is a unique question and most likely she has never had a guy ask her that before which is why it works for me. When I ask if they are single; I completely eliminate the boyfriend from the question, and I ask in a curious tone of voice, so I'm coming from a totally different point of view. And girls will not always tell you they have a boyfriend, that's why I ask immediately when I first talk to them.
Also, girls rarely approach guys in the first place, so if a girl ask if you have a girlfriend (and if she was hot) I think the guy would be flattered and consider going out with her. I also think it depends on the guy.