CPP Preprocessor Directives MCQ

Cpp MCQ
  1. Home
  2. Tutorials
  3. Cpp
  4. Preprocessor Directives
  5. Multiple Choice Question

(1) Which of the following preprocessor directive is used to include library files in source program ?

A) #define
B) #ifndef
C) #undef
D) #include

(2) #endif directive is __________ with #if directive.

A) Optional
B) Mandatory
C) Not a Part
D) None

(3) Define directives are normally written in.

A) Lower Case
B) Upper Case
C) Propper Case
D) None

(4) Which of the following use to temintae compilation process ?

A) #error
B) #if
C) #ifdef
D) #ifndef

(5) Which of the following directive is used to include conditional code in source program

A) #if
B) #ifdef
C) #ifndef
D) All of these

(6) #ifdef directive must include ____________ directive at end

A) #end
B) #endifdef
C) #endif
D) none

(7) Preprocessor directives are alway start with.

A) @
B) *
C) #
D) &

(8) Which of the following directive is used to define symbolic constant ?

A) #undef
B) #include
C) #def
D) #if

(9) Which of the following is not type of preprocessor directive?

A) include
B) def
C) undef
D) None

(10) Preprocessor directives are normally written __________ of the source program.

A) Top
B) Bottom
C) In Between
D) None
Comments
Login to TRACK of Comments.