18 January 2008

Tips for interviewing for a C programming job...

Don’t come to an interview for a C programming job if you can’t do simple type analysis. Just stay home. If I ask, “Given void *p, what are the types of the expressions p, *p, and &p?”, you should know the answers. Furthermore, you should know that—in that context—return *p is a compiler error and why. You should not be confused or scared by char **x. You should understand why printf("%p\n%p\n", ((char *) p) + 1, ((char **) p) + 1) prints two different numbers.

No comments: