C Programming - C Preprocessor
Exercise : C Preprocessor - True / False Questions
11.
In a macro call the control is passed to the macro.
Answer: Option
Explanation:
False, Always the macro is substituted by the given text/expression.
12.
A header file contains macros, structure declaration and function prototypes.
Answer: Option
Explanation:
True, the header file contains classes, function prototypes, structure declaration, macros.
13.
The preprocessor can trap simple errors like missing declarations, nested comments or mismatch of braces.
Answer: Option
Explanation:
False, the preprocessor cannot trap the errors, it only replaces the macro with the given expression. But the compiler will detect errors.
14.
A preprocessor directive is a message from compiler to a linker.
Answer: Option
Explanation:
FALSE
Example: #define symbol replacement
When the preprocessor encounters #define directive, it replaces any occurrence of symbol in the rest of the code by replacement. This replacement can be an statement or expression or a block or simple text.
15.
Once preprocessing is over and the program is sent for the compilation the macros are removed from the expanded source code.
Answer: Option
Explanation:
True, After preprocessing all the macro in the program are removed.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers