Jump to content
  • Advertisement
Sign in to follow this  
scottrick49

So I got through a phone interview...

This topic is 4354 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

Hi, I just graduated from college with a degree in CS and of course I want to get into game development. Yesturday I had a phone interview for a position as a game programmer, and now they want me to take a programming test. He said it would cover mostly C, but probably have one C++ question. Since I have done most of my projects thus far in C++, I am kind of wary about what kind of C questions they may ask. Any suggestions?

Share this post


Link to post
Share on other sites
Advertisement
my suggestion is don't worry. If you know C++ then you can pretty much do things in C, just drop the OOP paradigm (i.e. lose classes and everything involved with them, inheritence, etc.). Didn't they tell you that in school?

Share this post


Link to post
Share on other sites
If they know your experience is C++, it shouldn't be an issue. Just make sure and know malloc / free like the back of your hand. Short list of other things to keep in mind. printf / scanf line, no method overloading (use different function names), function pointers are extremely usefull in game programming.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
C has no classes, use structs instead

a struct is just like a class, except everything is public by default(you can switch it if you want, but why?)
and has no methods - you need to code separate functions that take the struct or ptr to the struct as an argument instead

C has no references, use pointers instead

all vars need to be declared at the beggining of a block before doing anything else

//slash slash style comments do not work, use /*asterisk style*/

by adding: extern "C" in front of a function declaration, you can make a C++ function that is callable from C code in a C compiler (the C++ function will need to be compiled to object file via the normal C++ compiler, and a C-safe header file is needed)

C is kinda a subset of C++, it is entirely possible to take C code and compile it with a C++ compiler just fine
the only thing to worry about is accidentally using C++ code in C compiler and having problems... but I don't think they are specifically trying to catch you on that kind of thing...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:

//slash slash style comments do not work, use /*asterisk style*/


Aren't double slash comments part of ANSI C, just not previous versions?

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:

//slash slash style comments do not work, use /*asterisk style*/


Aren't double slash comments part of ANSI C, just not previous versions?


If you mean C99, then you realize of course that Visual C++ is not C99 compliant. (It does of course support // for C files, but lacks nearly every C99 addition that is not part of C++).

Anyone using C for games is using C89 or a C/C++ hybrid. (Such as C89 with // comment support).

Share this post


Link to post
Share on other sites
I am terrified of coding tests as my mind has a tendancy to go blank at times like that.

I would rather they looked at the source code to my demo and examine how it is all structured and the design patterns used and the way I used the language in production code than test arbitary knowledge of various aspects of a programming language which can be looked up in a reference book in minutes.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Don't complicate things too much.

The C parts are probably just write a function that does 'x'.

The C++ part is probably write a class, template, etc that does 'x'.

I bet the test being in C doesn't necessarily mean its C specific, just no OO type stuff.

Still you should know the differences anyways.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I used to dislike tests too. But sometimes on the job, you gotta perform on the spot, whether you want to or not.

Plus tests start looking the same if you've taken enough of them :)

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!