Menasoft Menasoft Menasoft Menasoft Menasoft

April 14, 2006

How well do you know C++ ?

I found this a fun subject from a very old article. The August 97 issue of Dr. Dobbs Journal has an article that discusses tips for interviewing C++ programmer candidates. We all want to show off how smart we are don’t we? We have all heard some of these trick questions in interviews. Usually I think it has more to do with the interviewer trying to show off how smart they are. hehe. but they are still interesting.

I wasn’t real solid myself on all the answers so I thought it was worth sharing. To see how well someone understands the fundamental differences between C and C++, try one of the following

How do you link a C++ program to C functions?
Explain the scope resolution operator.
What are the differences between a C struct and a C++ struct? A C++ class?
How many ways are there to initialize an int with a constant?
How does throwing and catching exceptions differ from using setjmp and longjmp?

If a candidate claims to have done class design for a project, here are some questions that reveal how well they understand the technology.
What is your reaction to the statement “delete this;”?
What is a default constructor?
What is a conversion constructor?
What is the difference between a C++ struct and a C++ class
When should you use multiple inheritance?
What is a virtual destructor?
Explain the ISA and HASA class relationships. How would you implement each in a class design?
When is a template a better solution than a base class?

A bunch of other such questions can be found at an interesting site called Tech Interviews

It has more such questions in a number of different fields. Check out the “Windows Programming” test. It’s got some good stuff every windows programmer should probably know.

Filed under: Philosophic — admin @ 3:44 pm

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Time limit is exhausted. Please reload CAPTCHA.