Interesting C Interview Questions and Answers
thegeekstuff.com
Interesting C Interview Questions and Answers
1–10 of 41 posts
Re: Interesting C Interview Questions and Answers
#2Re: Interesting C Interview Questions and Answers
#3Re: Interesting C Interview Questions and Answers
#4Question 12 is even worse, as the processing order is implementation defined. On my compiler, it prints out 60..40..60.
C questions should be designed to show whether or not the candidate can write robust, professional quality code, not to test esoteric knowledge that even the interviewer can't get right.
I was asked questions like these in an interview once. It was such a massive red flag to me that I went with another company (the final straw was arguing over the size of int, which he insisted was always 32 bits).
Re: Interesting C Interview Questions and Answers
#5I've studied most of these as part of my introductory C course in university. Are they really that interesting?
Re: Interesting C Interview Questions and Answers
#6I've studied most of these as part of my introductory C course in university. Are they really that interesting?
Re: Interesting C Interview Questions and Answers
#7Question 10 is a bad question. The host environment is under no obligation to provide you with pointers to writable memory in argv. Furthermore, this is veering off from C knowledge into C trivia. Question 12 is even worse, as the processing order is implementation defined. On my compiler, it prints out 60..40..60. C questions should be designed to show whether or not the candidate can write robust, professional qual…
Sure, it can be important to know what these problems are and how to identify them if you should have to read through some terrible code written by someone else. Still, I think the author goes a bit far; it should be more important that you hire a programmer who doesn't produce this sort of code in the first place.
In the end I think there is no "best way" to technically test programmers; you're better off covering as many bases as possible with a bit of programming, a bit of documentation/explanation, some debugging, etc.
Re: Interesting C Interview Questions and Answers
#8I've studied most of these as part of my introductory C course in university. Are they really that interesting?
I took a total of 2 C classes as part of my CS degree and never learned any of these...
Re: Interesting C Interview Questions and Answers
#9Question 10 is a bad question. The host environment is under no obligation to provide you with pointers to writable memory in argv. Furthermore, this is veering off from C knowledge into C trivia. Question 12 is even worse, as the processing order is implementation defined. On my compiler, it prints out 60..40..60. C questions should be designed to show whether or not the candidate can write robust, professional qual…
Re: Interesting C Interview Questions and Answers
#10Question 10 is a bad question. The host environment is under no obligation to provide you with pointers to writable memory in argv. Furthermore, this is veering off from C knowledge into C trivia. Question 12 is even worse, as the processing order is implementation defined. On my compiler, it prints out 60..40..60. C questions should be designed to show whether or not the candidate can write robust, professional qual…
strncpy(argv[0], "NewName", 7);
WTF does 7 come from, the source or the destination?