"Joseph M. Newcomer" <email@example.com> wrote in message
On Wed, 15 Apr 2009 16:33:56 -0500, "AliR \(VC++ MVP\)"
Do you guys remember the "MFC interview questions" post a few weeks ago?
Well, I'm trying to hire a Jr. programmer to do some C#/Silverlight work
also help out with the C++/MFC stuff. Therefore OOP understanding is the
most important part for me. (The rest can be taught)
What do you guys think of these questions? Can you think of some good
questions to judge a persons problem solving skills?
1. What is polymorphism?
2. What is a virtual function, and how is it used?
This may be a stretch. While I consider this an important piece of
knowledge, I find that
many programmers can program effectively without it, as long as they
anything with abstract superclasses.
3. What is a pure virtual function, and why would you use it?
Diito. Good concept, but is it critical for a junior programmer?
4. When and why would you want to have a virtual destructor?
This is three virtual questions in a row, and that may be overkill. If
they miss question
2, they have no hope of answering 3 and 4. If they can answer 2, 3 and
5. What is the difference between a pointer and a reference? (In
other words: What must you always do to a reference?)
I'm not convinced this is a critical question. I prefer to use
possible, and I think Microsoft overuses pointers when references would
6. What's wrong with the following code sample?
class Super1: public Sub
class Super2 : public Sub
void DoSomething(Super1 *pSuper)
void DoSomething(Super2 *pSuper)
std::vector<Sub *> SubVector;
std::vector<Sub *>::iterator cur = SubVector.begin();
while (cur != SubVector.end())
How would you solve this problem?
It seems pretty obvious. There's at least three issues I see wrong in
that function call
preceding the delete, but are you sure the applicants are not reading
Questions 2 and 3 are critical to answering it, but this involves,
knowing how to
answer 2 & 3.
Joseph M. Newcomer [MVP]
MVP Tips: http://www.flounder.com/mvp_tips.htm