what is the best C++ book to prepare a advanced C++ interview. I would like a book with very good summary on concepts and tricks asked in interviews.
The C++ language questions that I've been asked in interviews have answers in the following books:
- Effective C++ and More Effective C++ by Meyers
- The C++ Programming Language by Stroustrup
- Design Patterns by Gamma et. al.
C++ is fantastically broad. My advice is to spend some time finding out as much as possible about the context of the position. From there you can focus on brushing up things that might come up in the interview.
The most important thing is to be able to converse with the right language. For that I'd suggest "Design Patterns: Elements of Reusable Object-Oriented Software" or similar, though if you are short on time there are also lots of summaries on the web. 'Advanced C++' is very hard to test for. The best way for an interviewer to gauge your ability is by discussing past projects you've done. So spend some time thinking about things you have worked on previously and how they illustrate your C++ abilities so that you are ready to talk about them.
Don't be too concerned about knowing all the special features and behaviours of C++. Focus on program design and structure. If you get asked specific questions you don't know the answer to, it is usually easy to lead the discussion toward a more general design related questions which you can then break down to the things you DO know and better demonstrate your knowledge.
Also to demonstrate 'Advanced C++' you should feel comfortable talking about its weaknesses. The FQA is great for this, entertaining and doesn't take much time.
Along with the books specified by others just refer this as well:
Guru of the Week -- a regular series of C++ programming problems created and written by Herb Sutter
There are excellent questions in the Guru of the Week. Actually comp.lang.c++.moderated is very good for preparing interview questions, most of the subjects are real-world problems.
The answer to this is going to depend on whether you're the interviewer or interviewee.
Interviewee
- any good educational text like Schildt's C++ From the Ground Up (http://www.herbschildt.com/cpppage.htm)
- some advanced material like Josuttis' The C++ Standard Template Library (http://www.josuttis.com/libbook/)
Interviewer
- the C++ standard (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf)
- Stephens; Diggins; Turkanis; Cogswell C++ Cookbook (http://www.cpp-cookbook.com/)
Both
- don't forget that getting everything "right" is not the goal - it's to find out if you can handle the job
- don't be afraid to say "I don't know" or "I wouldn't have thought of it that way"
If the job is that intensive about C++, skim through the ISO standard!
"Concepts and tricks" sounds more like advanced object-oriented programming than advanced C++.
Don't prepare for the interview, prepare for the job… if you don't know what techniques the job uses, attempting to review all techniques covered by C++ probably won't help.
Check out the book Programming Interviews Exposed. I think that is a good resource that lists a lot of programming topics that you should know. Here's a related SO question.
+1 on GOF Design Patterns book. +1 on Stroustrup
I would highly (very very) highly recommend anything by Herb Sutter; his website is www.gotw.ca
Check out his book co-authored by Andrei Alexandrescu called "C++ Coding Standards: 101 Rules, Guidelines, and Best Practices." This is not about coding standards like brackets and formatting, but some really great information about C++ and programming in general. Read and understand this book and you should incredibly prepared for your interview.
-bn