41.
Preprocessor directive #ifdef .. #else … #endif is used for conditional compilation.
A. True
B. False
Answer: Option A
Explanation:
True, these macros are used for conditional operation.
#if <constant-expression>
#elif <constant-expression>
#endif
42.
Macros with arguments are allowed
A. True
B. False
Answer: Option A
Explanation:
True, A macro may have arguments.
Example: #define CUBE(X)(X*X*X)
43.
In a macro call the control is passed to the macro.
A. True
B. False
Answer: Option B
Explanation:
False, Always the macro is substituted by the given text/expression.
44.
A header file contains macros, structure declaration and function prototypes.
A. True
B. False
Answer: Option A
Explanation:
True, the header file contains classes, function prototypes, structure declaration, macros.
45.
The preprocessor can trap simple errors like missing declarations, nested comments or mismatch of braces.
A. True
B. False
Answer: Option B
Explanation:
False, the preprocessor cannot trap the errors, it only replaces the macro with the given expression. But the compiler will detect errors.