tags:

views:

1850

answers:

12

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.

+14  A: 

Take a look at http://parashift.com/c++-faq-lite/

adatapost
An excellent choice for the technical stuff. I recall an interview question where I thought, "hey, I remember reading this in c++ faqs. I can answer this."
Brian
+22  A: 

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.
ChrisW
I don't consider these topics *advanced* C++, by the way, but they're as much as I've been asked in an interview.
ChrisW
if it's in stroustrup, it's going to span the gamut :)
warren
@ChrisW: Advanced is a very relative term. Finding people who've "heard" of these books is usually a plus!
Richard Corden
I like the Head First Design Pattern as a read, the Gamma one as a reference. Gamma's is a bit too dry for me.
Calyth
+3  A: 

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.

Timothy Pratley
+2  A: 

Inside the C++ Object Model by Stan Lippman. Good luck.

+5  A: 

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

aJ
+2  A: 

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.

barism
+1  A: 

The answer to this is going to depend on whether you're the interviewer or interviewee.

Interviewee

Interviewer

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"
warren
A: 

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.

Potatoswatter
Skimming through the standard is incredibly unhelpful. It's a reference work, intended to be consulted when you need it.
MSalters
The first few chapters have some important things, though. Phases of translation, the object model, the memory model in C++0x, what a C-style cast actually does, what requirements there are to get the advantages of aggregates, ... Sure, you don't need to read all 2000 pages in depth, but scanning it for the interesting tidbits is worth-while.
me22
+1 - not because it's the best recommendation for "concepts and tricks" - but because eventually knowing how to get something useful out of skimming the "C++ standard" (when you need to) can be a useful skill - and, really, because, while i can understand the downvote, I feel your answer doesn't really deserve to end up with a final negative vote - "preparing for the job" is reasonable advice ;)
Faisal Vali
+2  A: 
mahesh
+1  A: 
Kirill V. Lyadvinsky
A: 

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.

zooropa
A: 

+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

bn