I guess, it's not news that you should prepare for the interview. For interviewer it is about learning candidate's resume and thinking out questions that the candidate is supposed to answer or discuss. Depending on the candidate's level my questions of course will be different, but in general I would divide them into following 3 categories:
- Academic. These questions are concerned with more of a theoretical knowledge of the candidate and usually assume more or less exact answers. Something like "What is garbage collector? How does it work in .NET?" Also I try to put such questions in a way that will allow me to ask follow-up questions and elaborate the topic. E.g. if candidate says that there is generational garbage collector used in .NET, I would go ahead and ask what other types of GCs the candidate know and how they compare to generational GC. (Unfortunately, not so many candidates can take up a talk in this direction) If candidates know nothing about generational GC they usually compare .NET GC to Java by saying that .NET GC is "much better". Asking for more details is logical next step :)
- Experience. Here I usually start with "What is your greatest professional achievement you are really proud of?" Then questions go to most remarkable notices from the resume.
- Discussion. Questions or rather topics that allow more or less informal discussion. Often I just ask questions that I'm just curious about which are relevant to candidates experience or interests. Something like "How long does it take boost libraries to compile?" and so on about "usability" of boost. For me this section of interview is not about knowledge, but about opinion. I kind of assess candidate's general ability to think and present his thoughts.
Actually, if I see that that candidate feels comfortable on the interview I may use fourth category: provocative questions. Questions or assertions that go against common way of doing things or accepted knowledge with weak or irrational reasoning behind. I just need to say it confidently and ask the candidate for opinion. Well, sometimes I play so good that after all I have to say that it was just a joke and in reality it is somewhat different then I was saying.
Also the interview I try to create an atmosphere that helps to make it easier for the candidate to show his best. And I ask tricky questions only if I see that candidate can handle them. Interview is not about showing the candidate how miserable his knowledge or experience is, but about making him show everything he knows and can do.