InstructionsTotal Questions: 20Total Minutes: 20This ExamTray Free Online Exam or MCQ Quiz tests your C Preprocessor Directives like Macros, Conditional Compilation(#IFDEF, #ENDIF), File Inclusion #INCLUDE, #UNDEF, #PRAGMA etc. Examples are given as questions and answers. Easily Attend Competitive Exams and Job Interview Questions. Go through C Theory Notes on Preprocessor Directives before taking this test. All the Best Challenge SCORE0 / 20Take This Exam 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*Q Buttons 1) What does #include stdio.h does in c language.? A) It includes stdio.h into existing C program. B) #include increases the size of C program by including the specified file contents like functions, constants etc. C) #include includes specified file before compilation. D) All the above 2) What is the abbreviation of C STDIO in stdio.h.? A) Standard Input Output B) String Terminating Operations Input Output C) Store Input Output D) None of the above 3) Choose a correct statement about #include<stdio.h>.? A) A file named stdio.h will be searched in all directories and included if found B) A file named stdio.h will be searched in current directory and included if found C) A file named stdio.h will be searched in current directory and pre configured list of directories in search path and included if found D) None of the above 4) Choose a correct C statement about #include" A) A file named stdio.h will be searched in all directories and included if found B) A file named stdio.h will be searched in current directory and included if found C) A file named stdio.h will be searched in current directory and pre configured list of directories in search path and included if found D) None of the above 5) In Turbo C, Search Path of Directories for #Include is mentioned under the option.? A) Include Directories B) Exclude Directories C) Add Directories D) Extra Directories 6) Choose a correct form of using C Conditional Compilation commands IF ELSE .? A) #IF macroname statement1; statement2; #ELSE statement3; statement4; #END B) #IF macroname statement1; statement2; #ELSE statement3; statement4; #ENDIF C) #IFDEF macroname statement1; statement2; #ELSE statement3; statement4; #ENDIF D) #ifdef macroname statement1; statement2; #else statement3; statement4; #endif 7) What is the output of C program with conditional compilation commands.? #define CVV 156 int main() { #ifdef CVV printf("CVV YES"); #else printf("CVV NO"); #endif return 0; } A) 156 B) printf("CVV YES"); C) CVV YES D) CVV NO Ad 8) What is the output of C program with conditional compilation commands.?#define CVV 156 int main() { #ifdef cvv printf("CVV YES"); #else printf("CVV NO"); #endif return 0; } A) printf("CVV YES"); B) CVV YES C) CVV NO D) Compiler error 9) What is the output of C program with preprocessor directives.? int main() { #ifdef CVV printf("CVV YES"); #else #define CVV 199 #endif printf("NEW CVV=%d",CVV); return 0; } A) CVV 199 B) printf("CVV YES"); C) CVV YES D) NEW CVV=199 10) What is the output of C program.? int main() { #ifndef CVV #define CVV 199 printf("CVV=%d", CVV); #else printf("CVV=%d", 188); #endif return 0; } A) CVV=188 B) CVV=0 C) CVV=199 D) Compiler error 11) What is the output of C program with Preprocessor directives.? void show(); int main() { #ifndef CVV #define CVV 199 #endif show(); return 0; } void show() { printf("CVV=%d",CVV); } A) No output B) CVV=0 C) CVV=199 D) Compiler error 12) What is the output of C program with preprocessor directives.? int main() { #ifdef CVV #define CVV 199 #elif PVV printf("Inside ELIF"); #else printf("Inside ELSE"); #endif return 0; } A) Inside ELIF B) Inside ELSE C) No output D) Compiler error 13) What is the output of C program with #undef.? #define BIRD 5 int main() { #ifdef BIRD printf("BIRD=5."); #else printf("UNKNOWN."); #endif #undef BIRD #define BIRD 10 printf("BIRD=%d",BIRD); return 0; } A) BIRD=5.BIRD=5 B) BIRD=10.BIRD=10 C) BIRD=5.BIRD=10 D) Compiler error 14) What is the output of C program with #undef.? int main() { #undef BIRD printf("OKAY"); return 0; } A) OKAY B) Compiler error C) BIRDOKAY D) None of the above Ad 15) What is a Pragma in C language.? A) A Pragma may be an instruction to build tool to process or generate comments B) A Pragma may be an instruction to compiler to execute specific functions at specific times say startup or exit of program. C) A pragma may be an instruction to tell compiler to ignore certain warnings. D) All the above 16) What is the C Pragma directive or command to execute a particular function at startup of program.? A) #pragma start function1 B) #pragma statup function1 C) #pragma startnow function1 D) #prama startup function1 17) What is the output of C program with Pragma.? void show1(); void show2(); #pragma startup show1 #pragma exit show2 int main() { printf("MAIN."); } void show1() { printf("START."); } void show2() { printf("END."); } A) MAIN.START.END. B) START.MAIN.END C) START.END.MAIN D) END.START.MAIN 18) At what stage of building a C program does Pragma work.? A) Before Compilation B) After compilation C) After Linking D) None of the above 19) Choose a correct implementation of C Pragma Warning.? A) #pragma warn -par B) #pragma warn -rch C) #pragma warn -rvl D) All the above 20) Choose a correct statement about C Macro.? A) A Macro name can be in lower or upper case. B) A Macro can be nested. It can use another macro as part of its implementation. #define CVV 2*OLDCVV. Here OLDCVV is another macro defined prior to Macro CVV. C) Control is not passed to Macro as it is like just a dummy String(eg. CVV) Replacement technique with implementation (Macro Expansion part) D) All the above FINISH EXAM 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*PREVPreProcessor Directives - Online Test 1 NEXTC Program Build Process Online Test Certification Group ID 3864