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, #PRAMA 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 are the types of C Preprocessor Directives.? A) Macros B) Conditional Compilation C) File Inclusion D) All the above 2) Processor Directive in C language starts with.? A) $ symbol (DOLLAR) B) @ symbol (At The Rate) C) & symbol (Ampersand) D) # symbol (HASH) 3) Preprocessor in C language works on.? A) DOTC file (.c) B) DOTEXE file (.exe) C) DOTH file (.h) D) DOTCP file (.cp) 4) What is the another name for .C file.? A) Executable code B) Source Code C) Distributable Code D) Macro code 5) What is the keyword used to define a C macro.? A) def B) definition C) define D) defy 6) What is the output of C program with #define.? #define CVV 156 int main() { int a=10; a = a*CVV; printf("CVV=%d",a); return 0; } A) 0 B) 1560 C) 1560 D) Compiler error 7) What is the C keyword used to create global Constants.? A) constant B) definition C) def D) define Ad 8) Choose a correct C statement about #define statement.? #define CVV 156 A) CVV is called Macro Expansion. 156 is called Macro Template. B) CVV is called Macro Expansion. 156 is also called Macro Expansion. C) CVV is called Macro Template. 156 is called Macro Expansion. D) None of the above 9) What is the output file generated after processing a .C file.? A) .h file B) .exe file C) .cp file D) .bak file 10) How do you safeguard your .C file code from copying by outside developers or world.? A) Encrypt a C file and share B) Obfuscate a C file and share C) Scramble a C file and share D) Convert to Exe and share. 11) What is the output of C program with macros.? #define ERRMSG printf("Some error."); int main() { printf("JAR."); ERRMSG; return 0; } A) JAR. B) JAR.ERRMSG C) JAR.Some error. D) Compiler error 12) What is the output of C program with macros.? #define ERRMSG(a) printf("Error=%d",a); int main() { ERRMSG(10); return 0; } A) ERRMSG(10) B) Error= C) Error=10 D) Compiler error 13) What is the output of C program.? #define LOGIC(a,b) (a==b) int main() { if(LOGIC(5,5)) { printf("SAME "); } return 0; } A) SAME B) LOGIC(5,5) C) 5==5 D) Compiler error 14) How do you separate a multiline macro in C language.? A) Using * operator B) Using % operator C) Using \ operator D) Using + operator Ad 15) What is the output of C program.? #define LOOP(a) for(int i=1;i<=a;i++) \ {printf("%d ",i);} int main() { LOOP(5); return 0; } A) 5 B) 5 5 5 5 5 C) 1 2 3 4 5 D) Compiler error 16) What is the output of C program.? #define TANK(a) a*10+2 int main() { int a = TANK(2)*2; printf("%d",a); return 0; } A) 44 B) 22 C) 24 D) Compiler error 17) What is the file extension of expanded source code of .C file after preprocessing.? A) .e file B) .h file C) .l file D) .p file 18) What is the command to preprocess a C file manually.? A) pp abc.c B) cpp abc.c C) exp abc.c D) op abc.c 19) Choose a correct statement about C Macro.? A) Macro template(eg. PI or function) will be replaced by Macro Expansion(3.1428) as many number of times as it appears in the C program increasing Source Code size in bytes. B) Macros increase program speed when compared to functions. C) Functions use less memory as the program code is written and placed only one place in source code. Macros put function code everywhere it is called again and again. D) All the above 20) What is the C Preprocessor directive to be used to add a header file or any file to existing C program.? A) #add B) #present C) #include D) $include FINISH EXAM 1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20*PREVFormatted Output and Format Specifiers - Online Test 1 NEXTPreProcessor Directives - Online Test 2 Certification Group ID 3864