Is it OK to mix C and C++ in an interview?

Posted by John Pell on Programmers See other posts from Programmers or by John Pell
Published on 2012-08-30T19:19:47Z Indexed on 2012/08/30 21:50 UTC
Read the original article Hit count: 176

Filed under:
|
|

If I am asked in an interview to write down some code, should I completely stick with C++ or is it acceptable to "mix" the two to write easy code as it comes to my mind?

I'll explain it: if I'm asked to create a "stack" data type, a C++ class is perfectly suited, while if I need to parse some strings a strtok/sscanf is far easier than STL. On the other hand, if I need a generic container STL and templates are the way to go.

Everything can be done in C or in C++, but in an interview I can't code everything or remember every standard/STL function. What is an acceptable tradeoff?

© Programmers or respective owner

Related posts about c++

Related posts about interview