C Preprocessor MCQs
Practice free C Preprocessor multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 93 questions — no login required.
Question 10easy
What is the purpose of the #include directive in C preprocessing?
Question 11easy
What is the purpose of the #if directive in C preprocessing?
Question 12easy
In C, how do you use the #ifdef directive to conditionally include code if a macro is defined?
Advertisement
Question 13easy
What is the purpose of the #error directive in C preprocessing?
Question 14easy
What is the result of the #ifndef DEBUG directive if the DEBUG macro is defined?
Question 15easy
Which directive in C preprocessing is used to concatenate two or more strings?
Advertisement
Question 16easy
In C, what does the #line directive do in C preprocessing?
Question 17easy
What is the purpose of the #pragma once directive in C preprocessing?
Question 18easy
In C preprocessing, what is the purpose of the #elif directive?