Explore topic-wise MCQs in C Multiple Choice.

This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your C Multiple Choice knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following is not a preprocessor directive?

A. #error
B. #pragma
C. #if
D. #ifelse
Answer» E.
2.

The preprocessor directive which checks whether a constant expression results in a zero or non-zero value __________

A. if
B. ifdef
C. undef
D. ifndef
Answer» D. ifndef
3.

The purpose of the preprocessor directive #error is that ____________

A. It rectifies any error present in the code
B. It rectifies only the first error which occurs in the code
C. It causes the preprocessor to report a fatal error
D. It causes the preprocessor to ignore an error
Answer» D. It causes the preprocessor to ignore an error
4.

_______________ is the preprocessor directive which is used to end the scope of #ifdef.

A. elif
B. ifndef
C. endif
D. if
Answer» C. endif
5.

100

A. hello
B. “hello”
C. error
Answer» D.
6.

10

A. 20
B. Error
C. 1020
Answer» B. Error