

MCQOPTIONS
Saved Bookmarks
This section includes 22 Mcqs, each offering curated multiple-choice questions to sharpen your C Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
In a program the statement, |
A. | Before compilation |
B. | During execution |
C. | After Compilation |
D. | None of the above |
Answer» B. During execution | |
2. |
A macro must always be written in capital letters. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't Say |
Answer» C. May be True or False | |
3. |
What is the output generated by the following code? |
A. | 81 |
B. | 4 |
C. | 29 |
D. | None of the above. |
Answer» D. None of the above. | |
4. |
The EOF character can be included in a file as part of its data. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't Say |
Answer» C. May be True or False | |
5. |
Identify the trigraph sequence for '^'. |
A. | ??/ |
B. | ??= |
C. | ??’ |
D. | ??! |
Answer» D. ??! | |
6. |
What is a preprocessor directive |
A. | a message from compiler to the programmer |
B. | a message from programmer to the microprocessor |
C. | a message from programmer to the preprocessor |
D. | a message from compiler to the linker |
Answer» D. a message from compiler to the linker | |
7. |
Undefined function calls in a C program. |
A. | by the preprocessor |
B. | by the linker |
C. | by the assembler |
D. | by the operating system are detected |
Answer» D. by the operating system are detected | |
8. |
Identify the trigraph sequence for '\'. |
A. | ??/ |
B. | ??= |
C. | ?? |
D. | ??! |
Answer» B. ??= | |
9. |
Which of the following are correctly formed #define statements? |
A. | #define INCH PER FEET 12 |
B. | #define SQR(X) (X *X); |
C. | #define SQR(X) X*X |
D. | #define SQR(X) (X*X) |
Answer» E. | |
10. |
The NULL character indicates an end of a string and a file. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't Say |
Answer» C. May be True or False | |
11. |
All macro substitutions in a program are done |
A. | Before compilation of the program. |
B. | During execution |
C. | After compilation |
D. | None of the above |
Answer» B. During execution | |
12. |
argv[] is a? |
A. | a pointer array |
B. | It points to each argument passed to the program. |
C. | both a and b |
D. | None of the above |
Answer» D. None of the above | |
13. |
argc refers to the? |
A. | number of arguments passed |
B. | a pointer array |
C. | both a and b |
D. | None of the above |
Answer» B. a pointer array | |
14. |
va_list is |
A. | a macro defined in stdarg.h |
B. | a predefined data type in stdarg.h |
C. | a macro defined in stdlib.h |
D. | a predefined data type stdlib.h. |
Answer» C. a macro defined in stdlib.h | |
15. |
After preprocessing when the program is sent for compilation the macros are removed from the expanded source code. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't Say |
Answer» B. False | |
16. |
A macro should always be accommodated in a single line. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't Say |
Answer» B. False | |
17. |
Identify the macro(s) defined in stdarg.h. |
A. | va_start |
B. | va_end |
C. | va_arg |
D. | all the above |
Answer» E. | |
18. |
Nested macros are allowed. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't Say |
Answer» C. May be True or False | |
19. |
The command line arguments are handled using? |
A. | void() |
B. | main() |
C. | header files |
D. | macros |
Answer» C. header files | |
20. |
Identify the stringizing operator. |
A. | + |
B. | :: |
C. | # |
D. | ## |
Answer» D. ## | |
21. |
Macros with arguments are not allowed. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't Say |
Answer» C. May be True or False | |
22. |
What is the Error of this program? |
A. | compsciedu |
B. | Compilation error |
C. | Runtime error |
D. | None of the above |
Answer» C. Runtime error | |