A fun, quick article on interviewing C++ candidates. Link.
I used to have three questions that I called “the great levellers.”
1. What’s a virtual function? Everybody should know this. A few people didn’t (hey, nobody’s phone screen is perfect, I guess).
2. What’s an abstract base class? Again, a pretty basic question that I still got some wild answers to.
3. What’s a virtual base class? Answers to this range from “it’s an abstract base class” to “it’s a class you can call from main” to “I don’t know.”
Oddly enough, I preferred people to say “I don’t know” to #3 than to start relating their wild adventure storming towers of multiply inherited classes (“There we were, kilobytes from our base pointer and lost in a lair of mix-ins with nary a vtable pointer in sight, when we stumbled into the lair of the dreaded Thread Unsafe Static. It sloooowly raised its gnarled heads and regarded us with hungry eyes. ‘Race,’ it said, ‘I’ll race you to the exit.’, and we ran…”)