🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Game Programmer interview questions

Started by
20 comments, last by ihaveascreenname 13 years, 3 months ago
I have to admit, I find these tests pretty pointless. I did my first ever round of interviews a while back and the tests I did poorly in was these C++ trivia tests, and the ones I did well in were the ones where they sat you down at the computer to make a game.

It's like playing a quiz machine. You either know the answer because you came across it before or you don't. It probably does appear like the test measures skill and experience, but it's like saying swaying trees cause wind, as the applicant is just showing they've been around long enough to have done tests like this before.

The good news is that it's always the same questions that keep cropping up. Should be easy to revise a bunch of stuff next time I go job hunting.
Advertisement
Just threw this together real quick for counting up to 100 and back. Didn't test it, but it's pretty simple, so I'm pretty confident about it.
void count_it(int num)
{
printf("%i\n", num);

if (num < 100)
{
count_it(num + 1);
}

printf("%i\n", num);
}

count_it(1);

Also, I'm pretty sure the XOR swap is faster than adding and subtracting because it uses bitwise operations, though it's been a long time since I've actually analyzed it.
void swap(int &x, int &y)
{
x ^= y;
y ^= x;
x ^= y;
}

This topic is closed to new replies.

Advertisement