1. What is the purpose of the C preprocessor in C programming? A. Compile C code B. Optimize code C. Preprocess code before compilation D. Execute code Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
2. Which directive is used to include the contents of another file in a C program using the C preprocessor? A. #define B. #include C. #ifdef D. #pragma Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
3. What is the purpose of the #define directive in C preprocessing? A. To include a header file B. To define a macro C. To declare a constant D. To declare a variable Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
4. In C, which directive is used to conditionally include code based on preprocessor macros? A. #ifdef B. #ifndef C. #if D. #else Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
5. What is the result of the #ifdef DEBUG directive if the DEBUG macro is defined? A. The code block following it is included B. The code block following it is excluded C. It generates a compilation error D. It defines the DEBUG macro Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
6. Which directive in C preprocessing is used to define a macro with parameters? A. #define B. #ifdef C. #include D. #if Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
7. In C preprocessing, what is the purpose of the #undef directive? A. To undefine a macro B. To include a header file C. To define a macro D. To declare a variable Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
8. What does the #ifndef directive do in C preprocessing? A. Checks if a macro is defined B. Checks if a macro is not defined C. Checks if a variable is declared D. Checks if a function is defined Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
9. In C, what does the #pragma directive do in C preprocessing? A. Includes a header file B. Provides compiler-specific instructions C. Defines a macro D. Checks for syntax errors Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
10. What is the purpose of the #include directive in C preprocessing? A. To define a macro B. To include a header file C. To declare a variable D. To conditionally compile code Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board