

MCQOPTIONS
Saved Bookmarks
This section includes 204 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 C all functions except can be called recursively. |
A. | True |
B. | False |
Answer» C. | |
2. |
If is 2 bytes wide.What will be the output of the program? |
A. | ab |
B. | cd |
C. | ef |
D. | gh |
Answer» C. ef | |
3. |
If a function contains two statements successively, the compiler will generate warnings. Yes/No ? |
A. | Yes |
B. | No |
Answer» B. No | |
4. |
Will the following functions work? |
A. | Yes |
B. | No |
Answer» B. No | |
5. |
In a function two statements should never occur. |
A. | Yes |
B. | No |
Answer» C. | |
6. |
What will be the output of the following C code?
|
A. | Depends on the compiler |
B. | Garbage value |
C. | Compilation Error |
D. | Hello... |
E. | None of these |
Answer» E. None of these | |
7. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Hello... |
C. | Depends on compiler |
D. | Garbage value |
E. | None of these |
Answer» C. Depends on compiler | |
8. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Interview Mania |
C. | Garbage value |
D. | Depends on the compiler |
E. | None of these |
Answer» E. None of these | |
9. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 200 |
C. | Runtime Error |
D. | Depends on compiler |
E. | None of these |
Answer» B. 200 | |
10. |
What will be the output of the following C code?
|
A. | 200 |
B. | 100 |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» B. 100 | |
11. |
What will be the output of the following C code?
|
A. | "Manjesh Ojha" is printed 1 time |
B. | "Manjesh Ojha" is printed infinite time |
C. | "Manjesh Ojha" is printed 10 time |
D. | "Manjesh Ojha" is printed 5 time |
E. | None of these |
Answer» E. None of these | |
12. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | "Interview Mania" is printed 1 time |
C. | Nothing |
D. | "Interview Mania" is printed infinite time |
E. | None of these |
Answer» E. None of these | |
13. |
What will be the output of the following C code?
|
A. | Interview Mania |
B. | Compilation Error |
C. | Garbage value |
D. | Runtime Error |
E. | None of these |
Answer» C. Garbage value | |
14. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Interview Mania |
C. | Runtime Error |
D. | Depends on Compiler |
E. | None of these |
Answer» C. Runtime Error | |
15. |
What will be the output of the following C code?
|
A. | 51 18 25 |
B. | 25 18 51 |
C. | 18 25 51 |
D. | Compilation Error |
E. | None of these |
Answer» B. 25 18 51 | |
16. |
What will be the output of the following C code?
|
A. | Interview |
B. | 10 |
C. | Mania |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
17. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Welcome |
C. | 15 18 10 |
D. | Segmentation fault |
E. | None of these |
Answer» E. None of these | |
18. |
What is the problem in the following C declarations?
|
A. | A function with same name cannot have different return types |
B. | A function with same name cannot have different number of parameters |
C. | A function with same name cannot have different signatures |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
19. |
What will be the output of the following C code?
|
A. | 8 |
B. | Welcome |
C. | Welcome 8 |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
20. |
What will be the data type returned for the following C function?
|
A. | char |
B. | double |
C. | multiple type-casting in return is illegal |
D. | float |
E. | int |
Answer» F. | |
21. |
What will be the output of the following C code?
|
A. | Garbage value |
B. | Compilation Error |
C. | Nothing |
D. | 10 |
E. | None of these |
Answer» E. None of these | |
22. |
What will be the output of the following C code?
|
A. | Red |
B. | Yellow |
C. | Green |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
23. |
What will be the output of the following C code?
|
A. | 250 |
B. | Depends on compiler |
C. | Garbage value |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
24. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 100 |
C. | Depends on compiler |
D. | Runtime Error |
E. | None of these |
Answer» C. Depends on compiler | |
25. |
What will be the output of the following C code?
|
A. | Garbage value |
B. | Compilation Error |
C. | Ajit Kumar Gupta |
D. | Undefined behaviour |
E. | None of these |
Answer» C. Ajit Kumar Gupta | |
26. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Garbage value |
C. | Prayag |
D. | Segmentation fault |
E. | None of these |
Answer» E. None of these | |
27. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Garbage value |
C. | Raj |
D. | Undefined behaviour |
E. | None of these |
Answer» D. Undefined behaviour | |
28. |
What will be the output of the following C code?
|
A. | Garbage value |
B. | Undefined behaveiour |
C. | Nothing |
D. | Size of char |
E. | Compilation Error |
Answer» F. | |
29. |
What will be the output of the following C code?
|
A. | Rahul |
B. | Garbage value |
C. | Compilation Error |
D. | Undefined behaviour |
E. | None of these |
Answer» B. Garbage value | |
30. |
What will be the output of the following C code?
|
A. | 13 |
B. | 15 |
C. | 17 |
D. | 101 |
E. | 113 |
Answer» F. | |
31. |
What will be the output of the following C code?
|
A. | 100 |
B. | d |
C. | 101 |
D. | e |
E. | None of these |
Answer» E. None of these | |
32. |
What will be the output of the following C code?
|
A. | c |
B. | Compilation Error |
C. | d |
D. | Undefined behaviour |
E. | None of these |
Answer» E. None of these | |
33. |
What will be the output of the following C code?
|
A. | c |
B. | 99 |
C. | Undefined behaviour |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
34. |
What will be the output of the following C code?
|
A. | 99 |
B. | Compilation Error |
C. | c |
D. | Undefined behaviour |
E. | None of these |
Answer» D. Undefined behaviour | |
35. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Raj |
C. | Garbage value |
D. | Undefined behaviour |
E. | None of these |
Answer» B. Raj | |
36. |
What will be the output of the following C code?
|
A. | Interview |
B. | Mania |
C. | C |
D. | code |
E. | None of these |
Answer» E. None of these | |
37. |
What will be the output of the following C code?
|
A. | 10 |
B. | 12 |
C. | 14 |
D. | 16 |
E. | None of these |
Answer» E. None of these | |
38. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Interview |
C. | Mania |
D. | Garbage value |
E. | None of these |
Answer» D. Garbage value | |
39. |
What will be the output of the following C code?
|
A. | A |
B. | J |
C. | I |
D. | K |
E. | None of these |
Answer» C. I | |
40. |
What will be the output of the following C code having void return-type function?
|
A. | 5 |
B. | 4 |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» D. Runtime Error | |
41. |
What will be the output of the following C code?
|
A. | Ojha |
B. | Manjesh |
C. | Manjesh Ojha |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
42. |
What will be the output of the following C code?
|
A. | Interview |
B. | Mania |
C. | Interview Mania |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
43. |
What error will the following function give on compilation?
|
A. | Missing parentheses in return statement |
B. | The function should be defined as int fun(int x, int y ) |
C. | Re declaration of x |
D. | None of the above |
Answer» D. None of the above | |
44. |
Which of the following statements are correct about the following program?
|
A. | It prints "main" infinite number of times. |
B. | It runs an infinite loop without printing anything. |
C. | Compiler report an error since main() cannot be called recursively. |
D. | Address of main( ) would get printed infinite number of times. |
E. | Address of main( ) would get printed once. |
Answer» F. | |
45. |
What will be the output of the following C code?
|
A. | f |
B. | 102 |
C. | 105 |
D. | i |
E. | Undefined behaviour |
Answer» F. | |
46. |
Which of the following is the correct output for the program given below?
|
A. | AB |
B. | BC |
C. | CD |
D. | No output |
Answer» C. CD | |
47. |
Which of the following is the correct output for the program given below?
|
A. | 6 3 |
B. | 12 6 |
C. | 3 6 |
D. | 36 9 |
E. | 9 36 |
Answer» E. 9 36 | |
48. |
How many times the following program will print "Manjesh"?
|
A. | Infinite number of times |
B. | 32767 times |
C. | 65535 times |
D. | Till the stack doesn't overflow |
Answer» E. | |
49. |
Which of the following is the correct output for the program given below?
|
A. | 19 |
B. | 20 |
C. | 21 |
D. | 18 |
Answer» B. 20 | |
50. |
What will be the output of the program?_x000D_
#include
|
A. | Prints "IndiaBIX" 5 times |
B. | Function main() doesn't calls itself |
C. | Infinite loop |
D. | Prints "IndiaBIx" |
Answer» E. | |