i have to prepare for an interview in C++ technology. could you please drop in your suggestions and recommendations about how to start and what are the basic topics that i have to concentrate mostly on? i have a prior knowledge on the topics but i am confused with what to concentrate on as C++/C are very vast.also i think that i have to concentrate on more data stuructures using c/C++. is that a good decicsion to do some practice on them?
go over the C++ faq lite: http://www.parashift.com/c++-faq-lite/ its will give a tour around the language and its more obscure corners
I think that i have to concentrate on more data structures using c/C++. is that a good decision to do some practice on them?
Yes. Know how to implement and traverse lists, trees, and stacks. Almost every interview will more than touch on these areas. And I mean know how to implement this stuff yourself - not by relying on libraries or the STL (though you should be aware of how you would use the STL instead of implementing this stuff on your own in the real word, and be able to explain how you'd use the STL).
This isn't to say this is all you need to brush up on - but know how to deal with binary trees backwards and forwards.
IMO, if you feel that you have to "swot" for a technology interview, you are not really qualified for the job. Or at least, you are lacking the required experience.
That even includes an entry-level position for someone straight out of Uni. If they are recruiting someone for an entry-level position, they should make allowances for lack of experience. But if they want someone with experience in C++, no amount of last minute swotting will make up for lack of experience.
My advice is to do some C++ programming; e.g. at home, at Uni, in your current job. THEN apply for C++ positions.
swot: verb, swot⋅ted, swot⋅ting, noun British Slang.
–verb (used without object)
- to study or work hard.
I would recommend familiarity with the STL. Especially algorithms and function objects. Templates are a must.
This question ( C++ areas you look for during interview ) might help you.
When I got my first co-op, I didn't know too much C++ or C, but I knew a TON of Java, so I spent a couple days on reading wikipedia on the main differents, and then I went on to do a couple of small coding projects to understand the syntax and what exactly what was going on with pointers. C++ takes practice, but hey, I was able to get the job with just a couple days of studying.
Some important things to know would be how pointers work, the virtual and nonvirtual functions, the STL, inheritence, and polymorphism. Thats just a couple ;) And I'm assuming you know one particular language well, so I won't bug you about knowing your datastructures (lists, heaps, stacks, etc) and search/sort algorithms.
Good luck :)
I don't think that your question is specific enough for a good answer. Nonetheless, here's what I recommend:
- C++ occupies a middle ground between C and Java: It is object-oriented, but you must perform your own memory manipulation. Know both forms of the new and delete methods. Know pointer arithmetic.
- Be sure that any readings that you do about C++ is fairly modern (written in the last 10 years) and includes the changes that were made with C++98, particularly the STL.
- Know the standard library backwards and forwards. Know what does not appear in the standard library.
- Know how to make both function and class templates, and when they're best used.
- Expect questions about the differences between C++ and Java, and about the differences between C++ and C#.
If you really want to work your brain, learn about BOOST.
Good luck in your interview!
To me it all boils down to sincerity. Be sincere of what you know and what you don't. Take a look at common idioms (RAII is a must know, references/pointers, STL containers and iterators you should at least know what they are used for and transversing a container with iterators)... but be clear on what you really know and what you just know something about.
I have employed people that knew nothing of C++ and was clear about it in the first place. I will always prefer a candidate that does not know, accepts it and is willing to learn that a candidate that thinks that knows and fails to do so. Answering a question takes a few seconds of my time as long as the person learns from it.
Being clear on what languages you really know and your current level in C++ will allow the interviewer to get a feeling of your C++ knowledge in a couple of questions but turning into another language for more complex programming problems. I'd rather take a person that knows how to tackle a problem in another language than someone that knows the language but will not solve problems.
C++ is a hard language, if you insist that you know it while you don't, the most possible outcome is that you will make mistakes in the interview and show how much you know/lack.
I would re-read or skim through Effective C++. I'd do this whether I'm used to writing C++ everyday, or if it's been a while since doing much C++.
If you lucky, the interviewer will have you write a bit of code. If not, the interviewer usually has to ask questions to see how familiar your are with the language. For example, you might be asked 'why should you always declare a destructor as virtual?'. Well, you may have been declaring your destructors virtual for the last 10 years, but not be able to remember why.
I think a quick re-read or skim through Effective C++ will help you remember what you already know.
The necessary (but not sufficient) part of doing well on an interview about C++ is being good at writing code in C++. The only way to be good at writing code in C++ is to do it, a lot.
Good interviewers will be able to discern if you know how your language of choice works without asking what I call "vocabulary" questions (what does keyword 'x' mean). They'll ask you to implement something that will be much easier if you know particular features of the language (templates, polymorphism, overloading, etc). This isn't stuff you can cram for, it's stuff you have to know in your bones, and again the way to get that is to write lots of code.
An ancillary skill you'll need is interviewing well to showcase your skill in C++. Thankfully this requires far less practice. I strongly suggest getting together with friends and practicing interviews with a whiteboard -- search this site and the rest of the web for known interview questions, and answer them at the whiteboard (in C++ in this case), in front of your friends. Take turns. Grill each other. Get so that you can easily write code in front of other people, on a whiteboard, with no IDE to help you out. That'll let you show off your real skill.
Apart from other suggestions:
- Be sure to spell the language names correctly ("C++" and "C").
- Prefer not to build with them phrases like "c/C++" or "C++/C". When refering to both languages, just say "C and C++", or "C or C++".