A. a message from compiler to the programmer
B. a message from programmer to the microprocessor
C. a message from programmer to the preprocessor
D. a message from compiler to the linker
View Answer
Ans : C
Explanation: preprocessor directive is a message from programmer to the preprocessor.
12. Which of the following are correctly formed #define statements?
A. #define INCH PER FEET 12
B. #define SQR(X) (X *X);
C. #define SQR(X) X*X
D. #define SQR(X) (X*X)
View Answer
Ans : D
Explanation: #define SQR(X) (X *X) correctly formed #define statements
13. A macro must always be written in capital letters.
A. TRUE
B. May Be
C. FALSE
D. Can't Say
View Answer
Ans : B
Explanation: The statement is false
14. A macro should always be accommodated in a single
line.
A. TRUE
B. May Be
C. FALSE
D. Can't Say
View Answer
Ans : A
Explanation: Usually true. Some compilers allow multi-line macros
15. After preprocessing when the program is sent for
compilation the macros are removed from the expanded source code.
A. TRUE
B. FALSE
C. Can be true or false
D. Can't Say
View Answer
Ans : A
Explanation: The statement is True.
16. Macros with arguments are not allowed.
A. TRUE
B. May Be
C. FALSE
D. Can't Say
View Answer
Ans : B
Explanation: The statement is false
17. Nested macros are allowed.
A. TRUE
B. May Be
C. FALSE
D. Can't Say
View Answer
Ans : B
Explanation: The statement is false
18. Tn a macro call the control is passed to the macro.
A. TRUE
B. FALSE
C. May Be
D. Can't Say
View Answer
Ans : B
Explanation: The statement is false
19. All macro substitutions in a program are done?
A. Before compilation of the program.
B. During execution
C. After compilation
D. None of the above
View Answer
Ans : A
Explanation: All macro substitutions in a program are done Before compilation of the program.
20. In a program the statement:
#include "filename"
is replaced by the contents of the file "filename"?
A. Before compilation
B. During execution
C. After Compilation
D. None of the above