C Language MCQ’S | C Preprocessor 7

31.
Which of the following are correct preprocessor directives in C?

1: #ifdef
2: #if
3: #elif
4: #undef

A. 1, 2
B. 4
C. 1, 2, 4
D. 1, 2, 3, 4

 

32.
Which of the following are correctly formed #define statements in C?

A. #define CUBE (X) (X*X*X);
B. #define CUBE(x) (X*X*X)
C. #define CUBE(X)(X*X*X)
D. #define CUBE(X) {X*X*X}

 

33.
If the file to be included doesn’t exist, the preprocessor flashes an error message.

A. True
B. False

 

34.
Preprocessor directive #undef can be used only on a macro that has been #define earlier

A. True
B. False

 

35.
There exists a way to prevent the same file from getting #included twice in the same program.

A. True
B. False

 

Visitor Counter

0060950