C++ interview preparation [closed]

对着背影说爱祢 提交于 2019-12-03 00:01:51

问题


I have a Phone interview coming up next with with a company which works in financial software industry. The interview is mainly going to be in C++ and problem solving and logic. Please tell me the method of preparation for this interview. I have started skimming through Thinking in C++ and brushing up the concepts. Is there any other way I can prepare?? Please help.

Edit:

Thank you all everyone for the advice. I just want to add that I am currently fresh out of grad school and have no previous experience. So Can you suggest some type of questions that will be asked to new grads??


回答1:


Make sure you know your basic data structures and algorithms. You're more likely to be asked about that stuff than something higher up the food chain. Those are usually saved for the in-person interview.

Put another way: be solid with the fundamentals and solid with your C++ syntax. Also, knowledge of common libraries like STL and Boost couldn't hurt...but be sure you know what those libraries give you! In the end phone screens are there to cull out people who can't do the basics. Prove you can and you should move on to the next step. Good luck!

Here's some links of interview questions to check out:

  • C++ Interview Questions @ DevBistro
  • C++ Interview Questions @ Blogspot
  • C++ Interview Questions @ FYI Center
  • Steve Yegge's Five Essential Phone Screen Questions (added this in response to your edit. This isn't C++-only, but a lot of it applies to C++ and I think would be a good read in your situation).

Now, for completion's sake, some books:

  • Scott Meyers "Effective" series (Effective C++, More Effective C++, Effective STL)
  • Herb Sutter's "Exceptional" series (Exceptional C++, More Exceptional C++, Exceptional C++ Style)
  • The C++ Standard Library by Josuttis
  • C++ Primer by Lippman et al
  • Stroustrup's text as a reference



回答2:


I have interviewed several candidates specifically focusing on their C++ knowledge, and if there was one question that worked well to put peoples' knowledge of C++ on a gradient, it was this one:

Fix this memory leak as robustly as you can:

void doSomething()
{
Foo* pFoo = new Foo();
[do some stuff]
}
  • +1 for putting delete pFoo at the end
  • +2 for putting pFoo in a std::auto_ptr
  • +3 for knowing what RAII is - the concept, if not the acronym
  • +4 for mentioning exception-safety guarantees of the auto_ptr
  • +5 for putting pFoo in a boost:shared_ptr
  • +6 for knowing when a shared_ptr might not be freed.
  • +7 for talking about garbage collection techniques to fix circular references

This always worked to show how long someone had been working with C++. This is one datapoint you can use to tell where you are in the scale of C++ knowledge.

Edit: I would recommend someone for hire at level 3 or above.




回答3:


  • Try some practice problems on TopCoder.

  • Check out Marshall Cline's C++ FAQ. Its a good way to learn some new stuff and bone up on the things you already know in case the decide to ask you some 'knowledge' questions as opposed to 'problem solving' questions.




回答4:


Even if they're interviewing for a C++ position not all questions may be specific to C++. For example, I've been hit with questions related to the following all in the same set of interviews for a single C++ position:

  • Algorithmic complexity of well known sort and search algorithms
  • Multithreaded programming
  • Multiprocess programming
  • Sockets programming
  • Software development philosophy / approach
  • Software test and validation philosophy / approach
  • Debugging
  • Benchmarking
  • Dynamic and static analysis of code (e.g. run-time memory leak detection vs compile-time)

In my case, the phone interview was part of a screening process to determine if I could take an online C/C++ knowledge test (e.g. through BrainBench). The online test results then determined if I would be flown out for on-site interviews, which also included more "hands-on" software development tests.

YMMV. A lot depends on what you claim on your resume, as well.

Interviewers often try to help you by giving you hints so that they can see if you can arrive at the answer they're looking for. Besides gauging your knowledge, they also want to see how you think. Occassionally you might get a crummy interviewer that is neither helpful nor positive. The key is to be confident in your abilities and be truthful.

HTH and good luck!




回答5:


Besides the obvious parts of the language, I've found that employers will want to see if you fully understand pointers, references, how copy-constructors come into everything, probably STL, and of course the basics of classes.




回答6:


Grab a knowledgeable friend and have them ask you some C++ programming problems that you can solve on a whiteboard. A lot of interviews will have you solve a problem on a whiteboard, and it can be disconcerting to think on your feet and write things out in front of someone if you are not used to it.




回答7:


Something which I am starting to believe is that there is sometimes a clear divide between candidates that enjoy programming as a hobby versus those who consider it "just a day job".

Even if you don't know the answer to a specific question it is worth mentioning that normally you'd look up the answer on < your favourite resource > (eg. StackOverflow).

Based on your experience I don't think the interviewer will expect that you'll get every question right. They're most likely trying to decide if you've got "potential".

So relax and try to enjoy it!




回答8:


Read (or skim, depending on how much time you have to prepare) "Large-Scale C++ Software Design" by John Lakos. Chances are, you will need it.



来源:https://stackoverflow.com/questions/1569778/c-interview-preparation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!