I can't remember how to do a qsort. I'd have to look it up. I vaguely recall finding a pivot and then recursively sorting the sublists on either side of it.
I got the same thing on an interview the other day. Wanted to know how to write a server that listened on a socket and forked requests into different threads. I said you do something like open, then select or poll or something like that to wait for the connection and I can't remember exactly but this is boilerplate code I can find on the web or in any basic unix network programming manual.
Seemed to satisfy him. After all, its true.