

MCQOPTIONS
Saved Bookmarks
This section includes 14 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. |
What will be the output of the following C code?
|
A. | 10 |
B. | 11 |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» E. None of these | |
2. |
What will be the output of the following C code?
|
A. | interviewmania.com is printed infinite times |
B. | interviewmania.com |
C. | Runtime Error |
D. | Error because function name cannot be preceded by const |
E. | None of these |
Answer» C. Runtime Error | |
3. |
What will be the output of the following program:-
|
A. | 128 |
B. | 34 |
C. | Compiler error |
D. | garbage value |
Answer» D. garbage value | |
4. |
What will be the output of the following C code?
|
A. | 21 |
B. | Compilation Error |
C. | 12 |
D. | Runtime Error |
E. | None of these |
Answer» C. 12 | |
5. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | n is 4 |
C. | Runtime Error |
D. | Garbage value |
E. | None of these |
Answer» B. n is 4 | |
6. |
What will be the output of the following C code?
|
A. | 3 |
B. | Compilation Error |
C. | 7 |
D. | Runtime Error |
E. | None of these |
Answer» D. Runtime Error | |
7. |
What will be the output of the following C function?
|
A. | Compilation Error |
B. | Yellow |
C. | AstonMartin |
D. | 5 |
E. | Runtime Error |
Answer» E. Runtime Error | |
8. |
What will be the output of the following C code?
|
A. | 2 |
B. | 4 |
C. | 8 |
D. | 16 |
E. | None of these |
Answer» E. None of these | |
9. |
What will be the output of the following C code?
|
A. | num |
B. | num = 12 |
C. | num = 10 |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
10. |
In the following code snippet, character pointer str holds a reference to the string ___________.
|
A. | interviewmania.comc programming |
B. | interviewmania.com |
C. | c programming 0c programming |
D. | c programming |
E. | None of these |
Answer» D. c programming | |
11. |
What will be the output of the following C code?
|
A. | Red = 4 |
B. | Red = 5 |
C. | Red = 6 |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
12. |
Which of the following is the correct output for the program given below?
|
A. | 10 |
B. | 1 1 |
C. | No output |
D. | Error: ++ needs a l value |
Answer» E. | |
13. |
com |
A. | Sanfoundry.com\0training classes |
B. | Sanfoundry.comtraining classes |
C. | Invalid declaration |
Answer» C. Invalid declaration | |
14. |
PEACH = 3 |
A. | PEACH = 4 |
B. | PEACH = 5 |
C. | PEACH = 6 |
Answer» D. | |