Jump to content
  • Advertisement
Sign in to follow this  
ratha

Interview Preparation

This topic is 2524 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can any one post some good links to C/C++ Interview questions that were asked in any of the MNC's?

Share this post


Link to post
Share on other sites
Advertisement
http://www.gamedev.n..._hl__interviews

Believe it or not, I recently interviewed at a major game company in Tokyo and near the end, the CEO told me to tell a joke. It was a bit random.

“Superman was flying over the city when he saw Superwoman on the roof of a building, naked in a lawn chair.
He figured with his super speed he could get in and out before she even knew what happened.
He went in, did his thing, and happily zipped off in a blink of an eye.
Superwoman leaned up and said, ‘What was that??’
The Invisible Man replied, ‘I don’t know but my ass is killing me.’”


I was hired on-the-spot.



L. Spiro

Share this post


Link to post
Share on other sites
I would have flat refused, then walked if they pushed me on it. What a bizzare request, basically "will you debase yourself for me on my whim?".

Share this post


Link to post
Share on other sites
I am sorry you think of jokes as debasing yourself. I hold a second job acting on Japanese TV and movies here, and do dramas, commercials, etc.
But my goal is to be a comedian.

Telling jokes and making people laugh is what I do best (although you may never have guessed by my direct and to-the-point humorless writing style in 99% of my posts), and I don’t consider any shame in telling a joke in an interview.

For what it is worth, he debased himself no less than I did when I asked about the dress code and he replied, “Hmm, maybe pajamas are okay, though no one has ever really tried that.” He said he likes to joke, too.

The way I see it, such a question is a sign of an easy-going company where my sense of humor will be appreciated.


L. Spiro

Share this post


Link to post
Share on other sites
Know your elementary data structures and algorithms. Linked lists, hash tables, etc.

Some key C++ concepts to make sure you're comfortable with:
- references, pointers
- const correctness
- virtual functions, when/why virtual destructors are needed
- copy constructors and copy assignment operators
- RAII
- The 'Rule of Three' and why it exists
- The basics of exception handling and exception safety.
- Perhaps knowing the basics of templates is a good idea

With depressing/surprising regularity a question such as one of the following will turn up:

1. Write some code to reverse a linked list
2. Write some code to reverse the words in a sentence e.g. "cheese is a kind of meat" -> "meat of kind a is cheese". Can you do it 'in place', without the use of an additional buffer/string?

Otherwise, look at the company's core competencies and try to extrapolate the sort of code they might be writing. Will you have to brush up on graph theory? Will you be writing 'systems' code? Will you have to know the ins and outs of a typical rendering pipeline? etc.

Look at the job description. Does it mention anything you're unfamiliar with? Find out a little bit about those things. I wouldn't recommend trying to learn them end-to-end, as they've asked you in for an interview anyway, so obviously aren't too bothered that you don't know it, but it's good to have things to discuss and will allow you to queue up a question for when you're inevitably asked "do you have any questions for us?". But do make sure you really know everything you've said on your C.V. Lots of people will put "technology X", even though they only used it for a month 5 years ago. Don't let this catch you out; the mention of "Technology X" might be what they initially liked about you.

Though YogurtEmperor got away with it, a joke which is essentially about rape might not go town too well with some prospective employers. I'd prepare a safer one :)

Share this post


Link to post
Share on other sites

Though YogurtEmperor got away with it, a joke which is essentially about rape might not go town too well with some prospective employers. I'd prepare a safer one :)

I was worried about telling this particular joke, but it was a joke I had told within the last few days, so it was the only one to come to mind.
So I basically pretended I was struggling with morals for a few seconds before I told the joke.


But I agree it was risky. I was really worried it might offend them rather than make them laugh.
I got lucky. You might not (especially if you don’t live in Japan), so choose your jokes carefully.


By the way, while I am here, I can mention some of the questions they asked in the technical interview that were not mentioned before in the previous thread.
#1: You have a CMatrix class with a 4×4 array of floats as a member, declared as:
float m0[4][4];
Declare an overloaded [] operator that would allow the following:
float fM = mMatrix[3][2]; // mMatrix is a CMatrix object.

#2: Describe an algorithm for detecting if point P is inside triangle A0, A1, A2, assuming point P lies on the same plane as the triangle.

#3: Describe an algorithm for finding the distance between point P and a plane defined by the 3 points A0, A1, A2.


L. Spiro

Share this post


Link to post
Share on other sites

I would have flat refused, then walked if they pushed me on it. What a bizzare request, basically "will you debase yourself for me on my whim?".


Bah. 'Being a good fit' is important in pretty much any job. If you're a good programmer, but everyone hates you the team isn't going to work so well. Plus it provides insight to how well you think on your feet and what sort of person you are.

Share this post


Link to post
Share on other sites
I would also consider telling the sickest, filthiest mosy disgusting joke I could think of just to bask in the awkwardness, for a fun anecdote.

Share this post


Link to post
Share on other sites
I agree with edd, data structures and algorithms are the main thing you will be asked about in ANY tech interview. I can teach you how to write shader code or how to multithread physics, but if you don't know what a hash table is then you're pretty much useless. Learn core concepts. Also, try to show a deep knowledge of the language/platform/library that you're using to answer coding questions. If you're using the STL and you allocate a vector and then go through and manually set everything to 0 or NULL or something, that works but if you use an allocator then you're showing me that you have a deeper understanding of the STL (that was just one crappy example but I think you get the idea).

The other thing is that you MUST show passion in your interview, both for coding in general but also for things that you've worked on. Usually, someone will ask you "what's the most complicated thing you've ever worked on" (Microsoft) or "What's the most difficult bug that you've had to fix" (Google and Amazon) or "What have you written that you're most proud of" (several companies you haven't heard of). When they ask you an open-ended question like that, you need to show passion; what I mean by that is that you must show me that you did something that you're proud of, that you believe was awesome, that you understood in detail at a very deep level, and that you personally care about your solution, code, and whatever else it was that you did. Don't just answer that question briefly and move on, they should actually have to cut you off because you should be able to talk about that for hours (I'm not exaggerating here, I really mean that you should be able to talk for hours about stuff that you've worked on). Also, go deep into the details, don't assume that the person you're talking to won't know what you're talking about. I've been a programmer for a very long time, so there are very few topics that you could bring up where I would be completely lost (physics would be a good one) but trust me, I know what you're talking about so don't spare the details, because if you do then I won't believe that you know what you're talking about or that you care about whatever you're talking about.

Overall, if you have no passion then you will NOT be hired, no matter how much you know or how good you are. If you have a lot of passion and are pretty good technically (maybe not the top technical candidate but still pretty good) then I'd probably still hire you, since I can fill in the gaps in your knowledge easily but if you don't care about what you're working on, then you're useless.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!