

MCQOPTIONS
Saved Bookmarks
This section includes 91 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 code snippet given below?
|
A. | 0 0.000000 |
B. | Garbage values |
C. | Erroe |
D. | None of the above |
Answer» B. Garbage values | |
2. |
Which of the following is the correct output fot the program given below?
|
A. | 0 0.000000 |
B. | Garbage values |
C. | Error |
D. | None of the above |
Answer» B. Garbage values | |
3. |
Which of the following will stop the loop at the last node of a linked list in the following C code snippet?
|
A. | All of above |
B. | None of these |
Answer» B. None of these | |
4. |
The number of distinct nodes the following struct declaration can point to is _____________.
|
A. | 3 |
B. | 2 |
C. | 1 |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
5. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 39 |
C. | 42 |
D. | Garbage value |
E. | None of these |
Answer» B. 39 | |
6. |
What will be the output of the following C code?
|
A. | Garbage value |
B. | India |
C. | 91 |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
7. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 125 0 |
C. | Garbage value |
D. | Nothing |
E. | None of these |
Answer» C. Garbage value | |
8. |
What will be the output of the following C code?
|
A. | Garbage value |
B. | 0 |
C. | 10 |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
9. |
What will be the output of the following C code?
|
A. | 21 |
B. | 11 |
C. | Compilation Error |
D. | Undefined behaviour |
E. | None of these |
Answer» D. Undefined behaviour | |
10. |
What will be the output of the following C code?
|
A. | Equal |
B. | Not Equal |
C. | Garbage value |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
11. |
What will be the output of the following C code?
|
A. | Prayag |
B. | Ajit |
C. | Compilation Error |
D. | Garbage value |
E. | None of these |
Answer» D. Garbage value | |
12. |
The correct syntax to access the member of the ith structure in the array of structures is?
|
A. | sct[j].n; |
B. | sct.n[j]; |
C. | sct.[j].n; |
D. | sct.n.[j]; |
E. | None of these |
Answer» B. sct.n[j]; | |
13. |
What will be the output of the following C code?
|
A. | India |
B. | Compilation Error |
C. | Garbage value |
D. | Nothing |
E. | None of these |
Answer» B. Compilation Error | |
14. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 0.000000 55 |
C. | Garbage value |
D. | depends on compiler |
E. | None of these |
Answer» C. Garbage value | |
15. |
What will be the output of the following C code?
|
A. | 150 150 |
B. | Compilation Error |
C. | Garbage value |
D. | Nothing |
E. | None of these |
Answer» B. Compilation Error | |
16. |
What will be the output of the following C code?
|
A. | 110 110 |
B. | Compilation Error |
C. | Garbage value |
D. | Undefined behaviour |
E. | None of these |
Answer» C. Garbage value | |
17. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Garbage value |
C. | Nothing |
D. | 100 |
E. | None of these |
Answer» B. Garbage value | |
18. |
How many bytes in memory taken by the following C structure?
|
A. | Multiple of word size |
B. | Depends on the platform |
C. | integer size+character size |
D. | Multiple of integer size |
E. | None of these |
Answer» E. None of these | |
19. |
What will be the output of the following C code?
|
A. | Ajit Ajit Ajit Sujit |
B. | Sujit Ajit Ajit Ajit |
C. | Sujit Ajit |
D. | Compilation Error |
E. | None of these |
Answer» B. Sujit Ajit Ajit Ajit | |
20. |
What will be the output of the following C code? (Assuming size of int be 4)
|
A. | 16 |
B. | 12 |
C. | 4 |
D. | Compilation Error |
E. | None of these |
Answer» C. 4 | |
21. |
Comment on the output of the following C code.
|
A. | No Compile time error, generates an array of structure of size 9 |
B. | Compile time error, illegal declaration of a multidimensional array |
C. | Compile time error, illegal assignment to members of structure |
D. | No Compile time error, generates an array of structure of size 3 |
E. | None of these |
Answer» E. None of these | |
22. |
What will be the output of the following C code?
|
A. | India |
B. | Garbage value |
C. | Undefined behaviour |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
23. |
What will be the output of the following C code?
|
A. | 33 |
B. | Compilation Error |
C. | 44 |
D. | Garbage value |
E. | None of these |
Answer» C. 44 | |
24. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 12 |
C. | Segmentation fault/code crash |
D. | 22 |
E. | None of these |
Answer» B. 12 | |
25. |
What will be the output of the following C code?
|
A. | 12 0 |
B. | Compilation Error |
C. | 12 garbage value |
D. | Nothing |
E. | undefined behaviour |
Answer» B. Compilation Error | |
26. |
What will be the output of the following C code?
|
A. | 24 |
B. | 34 |
C. | 44 |
D. | 54 |
E. | Compilation Error |
Answer» F. | |
27. |
What will be the output of the following C code?
|
A. | Garbage value |
B. | Compilation Error |
C. | 105 0 |
D. | Nothing |
E. | None of these |
Answer» D. Nothing | |
28. |
What will be the output of the following C code?
|
A. | 100 200 |
B. | 300 400 |
C. | 101 101 |
D. | Garbage value |
E. | None of these |
Answer» D. Garbage value | |
29. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Garbage value |
C. | Undefined behaviour |
D. | 150 0 |
E. | None of these |
Answer» E. None of these | |
30. |
What will be the output of the following C code?
|
A. | Undefined behaviour |
B. | 15 |
C. | Compilation Error |
D. | Segmentation fault |
E. | None of these |
Answer» D. Segmentation fault | |
31. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Garbage value |
C. | Segmentation fault |
D. | Undefined behaviour |
E. | None of these |
Answer» B. Garbage value | |
32. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Garbage value |
C. | 101 |
D. | Nothing |
E. | None of these |
Answer» D. Nothing | |
33. |
Which option is not possible for the following function call?
|
A. | Individual member can be passed by reference in a function |
B. | Individual member s address can be displayed in structure |
C. | Compiler can access entire structure from the function |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
34. |
Which of the following is an incorrect syntax to pass by reference a member of a structure in a function?
|
A. | func(&(e).num); |
B. | func(&(e.num)); |
C. | func(&e.num); |
D. | All of above |
E. | None of these |
Answer» F. | |
35. |
Which of the following is an incorrect syntax for pointer to structure?
|
A. | (*ptr_struct).n = 110; |
B. | ptr_struct->n = 110; |
C. | *ptr_struct.n = 110; |
D. | Both (*ptr_struct).n = 110; and *ptr_struct.n = 110; |
E. | None of these |
Answer» D. Both (*ptr_struct).n = 110; and *ptr_struct.n = 110; | |
36. |
What will be the output of the following C code?
|
A. | Welcome |
B. | Garbage value |
C. | Nothing |
D. | Compilation Error |
E. | None of these |
Answer» B. Garbage value | |
37. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Garbage value |
C. | Segmentation fault |
D. | Patna |
E. | None of these |
Answer» E. None of these | |
38. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Segmentation fault |
C. | Garbage value |
D. | Prayag |
E. | None of these |
Answer» C. Garbage value | |
39. |
What will be the output of the following C code?
|
A. | Interveiw |
B. | Mania |
C. | Compilation Error |
D. | Interview Mania |
E. | None of these |
Answer» E. None of these | |
40. |
What will be the output of the following C code?
|
A. | Undefined behaviour |
B. | Compilation Error |
C. | Garbage value |
D. | Nothing |
E. | False |
Answer» F. | |
41. |
What will be the output of the following C code?
|
A. | 100 90 |
B. | 13 95 |
C. | 55 92 |
D. | 100 55 |
E. | None of these |
Answer» E. None of these | |
42. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 11 21 |
C. | 13 41 |
D. | 11 15 |
E. | None of these |
Answer» E. None of these | |
43. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Segmentation fault |
C. | Undefined behaviour |
D. | Runtime Error |
E. | None of these |
Answer» D. Runtime Error | |
44. |
What will be the output of the following C code?
|
A. | Segmentation fault |
B. | Garbage value |
C. | Compilation Error |
D. | 20 |
E. | None of these |
Answer» B. Garbage value | |
45. |
What will be the output of the following C code?
|
A. | Interview Mania |
B. | Different memory address |
C. | Same memory address |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
46. |
What will be the output of the following C code?
|
A. | 200 |
B. | Compilation Error |
C. | 100 |
D. | Undefined behaviour |
E. | None of these |
Answer» D. Undefined behaviour | |
47. |
What will be the output of the following C code?
|
A. | Undefined behaviour |
B. | Nothing |
C. | Garbage value |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
48. |
What will be the output of the following C code?
|
A. | 4 |
B. | 8 |
C. | 16 |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
49. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Garbage value |
C. | Prayag |
D. | Undefined behaviour |
E. | None of these |
Answer» B. Garbage value | |
50. |
What will be the output of the following C code?
|
A. | Interview |
B. | Mania |
C. | Interview Mania |
D. | Mania Interview |
E. | None of these |
Answer» E. None of these | |