Interview Questions

I a'm getting strange syntax errors inside lines I have ifdeffed out.

C Interview Questions and Answers


(Continued from previous question...)

I a'm getting strange syntax errors inside lines I have ifdeffed out.

Under ANSI C, the text inside a ``turned off'' #if, #ifdef, or #ifndef must still consist of ``valid preprocessing tokens.'' This means that the characters " and ' must each be paired just as in real C code, and the pairs mustn't cross line boundaries. (Note particularly that an apostrophe within a contracted word looks like the beginning of a character constant.) Therefore, natural-language comments and pseudocode should always be written between the ``official'' comment delimiters /* and */.

(Continued on next question...)

Other Interview Questions