

MCQOPTIONS
Saved Bookmarks
This section includes 49 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. | Compilation Error |
B. | Case N |
C. | Default |
D. | All of above |
E. | None of these |
Answer» B. Case N | |
2. |
Which of the following statement are correct about the program given below?
|
A. | Output: Have a nice day |
B. | No output |
C. | Error: 'Expression syntax' |
D. | Error: 'Undeclared identifier if' |
Answer» D. Error: 'Undeclared identifier if' | |
3. |
Which of the following statement are correct about the program given below?
|
A. | Error: 'elseif is not a keyword in C' |
B. | Error: 'Expression syntax' |
C. | Error: 'L value required' |
D. | Error: 'R value requaired' |
Answer» B. Error: 'Expression syntax' | |
4. |
Which of the following is the correct output for the program given below?
|
A. | 400 400 300 |
B. | Garbage 400 300 |
C. | 400 Garbage 300 |
D. | 400 400 Garbage` |
Answer» D. 400 400 Garbage` | |
5. |
Which of the following is the correct output for the program given below ?
|
A. | Error: 'Misplaced Continue' |
B. | Bye |
C. | No output |
D. | Good Morning |
E. | Good Evening |
Answer» B. Bye | |
6. |
Which of the following cannot be checked in a switch - case statement? |
A. | Character |
B. | Integer |
C. | Float |
D. | enum |
Answer» D. enum | |
7. |
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input).
|
A. | Hey |
B. | Hellow |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» D. Runtime Error | |
8. |
Comment on the output of the following C code.
|
A. | No error, output is 2 |
B. | Compile time error, case label outside switch statement |
C. | No error, output is 2222 |
D. | Compile time error, no break statements |
E. | None of these |
Answer» C. No error, output is 2222 | |
9. |
What will be the output of the following C code?
|
A. | Right... |
B. | Wrong... |
C. | Right... Wrong... |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
10. |
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input).
|
A. | 1 |
B. | Compilation Error |
C. | 2 |
D. | Runtime Error |
E. | None of these |
Answer» C. 2 | |
11. |
What will be the output of the following C code?
|
A. | Runtime Error |
B. | I am Sad... |
C. | I am Happy... |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
12. |
What will be the output of the following C code?
|
A. | Yes... |
B. | No... |
C. | Yes... No... |
D. | Runtime Error |
E. | Compilation Error |
Answer» D. Runtime Error | |
13. |
What will be the output of the following C code?
|
A. | Character case value error |
B. | Right... |
C. | Wrong... |
D. | Duplicate case value error |
E. | None of these |
Answer» E. None of these | |
14. |
What will be the output of the following C code?
|
A. | 12 |
B. | Option: First |
C. | Option: Default |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
15. |
What will be the output of the following C code? (Assuming that we have entered the value 3 in the standard input).
|
A. | Runtime Error |
B. | Compilatin Error |
C. | Hey... |
D. | Hello... |
E. | None of these |
Answer» E. None of these | |
16. |
What will be the output of the following C code?
|
A. | 10 |
B. | Compilation Error |
C. | 10 |
D. | True |
E. | False |
Answer» C. 10 | |
17. |
What will be the output of the following C code? (Assuming that we have entered the value 2 in the standard input).
|
A. | Option 1. |
B. | Option 2. |
C. | Default option. |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
18. |
What will be the output of the following C code? (Assuming that we have entered the value 2 in the standard input).
|
A. | Hey... |
B. | Hello... |
C. | How are U? |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
19. |
What will be the output of the following C code?
|
A. | Everything is okay. |
B. | Everything is not okay. |
C. | I have fever. |
D. | Compilation Error |
E. | Runtime Error |
Answer» E. Runtime Error | |
20. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Runtime Error |
C. | Right... |
D. | Wrong... |
E. | None of these |
Answer» D. Wrong... | |
21. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | False... |
C. | True... |
D. | It will print nothing. |
E. | None of these |
Answer» E. None of these | |
22. |
What will be the output of the following C code?
|
A. | False, 20 |
B. | 20, False |
C. | 5, True |
D. | True, 5 |
E. | None of these |
Answer» E. None of these | |
23. |
What will be the output of the following C code?
|
A. | Inside else block executed... |
B. | Inside if block executed... |
C. | Inside else if block executed... |
D. | Compilation Error |
E. | None of these |
Answer» B. Inside if block executed... | |
24. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Hey |
C. | How are u? |
D. | Runtime Error |
E. | None of these |
Answer» D. Runtime Error | |
25. |
What will be the output of the following C code?
|
A. | 6 |
B. | Hey |
C. | Hello |
D. | No |
E. | None of these |
Answer» C. Hello | |
26. |
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input)
|
A. | name |
B. | 1 |
C. | 2 |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
27. |
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input)
|
A. | 1 |
B. | 2 |
C. | Garbage value |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
28. |
What will be the output of the following C code?
|
A. | Hey.. |
B. | Hellow... |
C. | 15 |
D. | true |
E. | Compilation Error |
Answer» F. | |
29. |
What will be the output of the following C code?
|
A. | 2 |
B. | 6 |
C. | Compilation Error |
D. | Hello |
E. | None of these |
Answer» E. None of these | |
30. |
What will be the output of the following C code?
|
A. | Hey |
B. | Hello |
C. | Hey Hello |
D. | Hey Hello How are u? |
E. | Hey How are u? Hello |
Answer» D. Hey Hello How are u? | |
31. |
What will be the output of the following C code?
|
A. | True |
B. | False |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» B. False | |
32. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Inside if block executed... |
C. | Inside else if block executed... |
D. | Runtime Error |
E. | None of these |
Answer» C. Inside else if block executed... | |
33. |
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input)
|
A. | Compilation Error |
B. | 1 |
C. | Runtime Error |
D. | 2 |
E. | None of these |
Answer» E. None of these | |
34. |
What will be the output of the following C code? (Assuming that we have entered the value 2 in the standard input)
|
A. | 1 |
B. | Hey... |
C. | 2 |
D. | Compilation Error |
E. | Runtime Error |
Answer» D. Compilation Error | |
35. |
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input)
|
A. | Compilation Error |
B. | Runtime Error |
C. | 1 |
D. | 1 2 |
E. | 2 |
Answer» E. 2 | |
36. |
Which of the following statements are correct about the program given below?
|
A. | Error: 'Declaration terminated incorrectly' |
B. | Error: 'Syntax error' |
C. | Error: 'Lvalue required' |
D. | Error: 'Expression syntax' |
E. | The program works correctly without error. |
Answer» F. | |
37. |
Which of the following is the correct output for the program given below?
|
A. | a and b are equal |
B. | a and b are not equal |
C. | Unpredictable |
D. | No output |
Answer» B. a and b are not equal | |
38. |
Which of the following statements are correct about the following program?
|
A. | Error : 'Expression syntax' |
B. | Error : 'L value required' |
C. | Error : 'R value required' |
D. | The code runs successfully. |
Answer» C. Error : 'R value required' | |
39. |
Which of the following is the correct output for the program given below?
|
A. | 0 1 3 |
B. | 1 2 3 |
C. | 3 1 3 |
D. | 1 3 1 |
Answer» D. 1 3 1 | |
40. |
Which of the following is the correct output for the program given below ?
|
A. | I am inside if |
B. | I am inside else |
C. | random value |
D. | No Output |
Answer» C. random value | |
41. |
Which of the following is the correct output for the program given below?
|
A. | y = 300 z = 200 |
B. | y = 200 z = garbage |
C. | y = 300 z = garbage |
D. | y = 200 z = 450 |
E. | y = 200 z = 600 |
Answer» E. y = 200 z = 600 | |
42. |
Which of the following is the correct output for the program given below ?
|
A. | 220 |
B. | 50 |
C. | 710 |
D. | 650 |
Answer» B. 50 | |
43. |
Which of the following is the correct output for the program given below?
|
A. | b = 60 |
B. | a = 0 |
C. | a = 50 |
D. | a = 1 |
Answer» D. a = 1 | |
44. |
What will be the output of the following C code? (Assuming that we have entered the value 2 in the standard input) |
A. | 1 |
B. | Hey... |
C. | 2 |
D. | Compilation Error |
E. | Runtime Error |
Answer» D. Compilation Error | |
45. |
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input) |
A. | Compilation Error |
B. | 1 |
C. | Runtime Error |
D. | 2 |
E. | None of these |
Answer» E. None of these | |
46. |
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input). |
A. | Hey |
B. | Hellow |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» D. Runtime Error | |
47. |
What will be the output of the following C code? (Assuming that we have entered the value 3 in the standard input). |
A. | Runtime Error |
B. | Compilatin Error |
C. | Hey... |
D. | Hello... |
E. | None of these |
Answer» E. None of these | |
48. |
What will be the output of the following C code? (Assuming that we have entered the value 2 in the standard input). |
A. | Option 1. |
B. | Option 2. |
C. | Default option. |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
49. |
Which of the following cannot be checked in a |
A. | Character |
B. | Integer |
C. | Float |
D. | enum |
Answer» D. enum | |