

MCQOPTIONS
Saved Bookmarks
This section includes 202 Mcqs, each offering curated multiple-choice questions to sharpen your C Programming knowledge and support exam preparation. Choose a topic below to get started.
101. |
What will be the output of the following C code?
|
A. | Garbage value |
B. | Compilation Error |
C. | 101 |
D. | 102 |
E. | Same memory address |
Answer» C. 101 | |
102. |
What will be the output of the following C code?
|
A. | 11 |
B. | 12 |
C. | 13 |
D. | 14 |
E. | Compilation Error |
Answer» F. | |
103. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 14 |
C. | Garbage value |
D. | 16 |
E. | None of these |
Answer» E. None of these | |
104. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 15, 15, 15 |
C. | Garbage value, Garbage value, Garbage value |
D. | Garbage value, 15, 15 |
E. | None of these |
Answer» B. 15, 15, 15 | |
105. |
What will be the output of the following C code?
|
A. | 51, 51, Garbage value |
B. | Garbage value, Garbage value, Garbage value |
C. | 51, 51, 51 |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
106. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | W |
C. | L |
D. | Garbage value |
E. | None of these |
Answer» B. W | |
107. |
What will be the output of the following C code?
|
A. | S I |
B. | I S |
C. | Garbage value |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
108. |
What will be the output of the following C code?
|
A. | InterviewMania |
B. | Mania |
C. | Compilation Error |
D. | I M |
E. | None of these |
Answer» D. I M | |
109. |
Is the below declaration legal?
|
A. | Undefined behaviour |
B. | True |
C. | False |
D. | Depends on the standard |
E. | None of these |
Answer» D. Depends on the standard | |
110. |
What will be the output of the following C code?
|
A. | compilation Error |
B. | Garbage value |
C. | 15 |
D. | Nothing |
E. | None of these |
Answer» D. Nothing | |
111. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Garbage value |
C. | Peter England |
D. | Nothing |
E. | None of these |
Answer» B. Garbage value | |
112. |
What will be the output of the following C code?
|
A. | 10 |
B. | Compilation Error |
C. | Audi |
D. | Garbage value |
E. | None of these |
Answer» C. Audi | |
113. |
What will be the output of the following C code?
|
A. | Nothing |
B. | Ajit Kumar Gupta |
C. | 10 |
D. | Garbage value |
E. | Compilation Error |
Answer» F. | |
114. |
What will be the output of the following C code?
|
A. | Undefined behaviour |
B. | Garbage value |
C. | Compilation Error |
D. | 51 |
E. | None of these |
Answer» D. 51 | |
115. |
Comment on the following pointer declaration.
|
A. | p and n both are not pointers to integer |
B. | p is a pointer to integer, n may or may not be |
C. | p and n, both are pointers to integer |
D. | p is a pointer to integer, n is not |
E. | None of these |
Answer» E. None of these | |
116. |
What will be the output of the following C code?
|
A. | Segmentation fault |
B. | Undefined behaviour |
C. | Compilation Error |
D. | 12 |
E. | None of these |
Answer» B. Undefined behaviour | |
117. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 11 |
C. | Undefined behaviour |
D. | Segmentation fault/runtime crash since pointer to local variable is returned |
E. | None of these |
Answer» C. Undefined behaviour | |
118. |
What will be the output of the following C code?
|
A. | 110 |
B. | Undefined behaviour |
C. | Garbage value |
D. | Compilation Error |
E. | 0.000000 |
Answer» F. | |
119. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Garbage value |
C. | 12 |
D. | Nothing |
E. | None of these |
Answer» B. Garbage value | |
120. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 113 |
C. | Garbage value |
D. | Runtime Error |
E. | None of these |
Answer» B. 113 | |
121. |
What will be the output of the following C code?
|
A. | 101 |
B. | Compilation Error |
C. | Address of var |
D. | Garbage value |
E. | None of these |
Answer» B. Compilation Error | |
122. |
What will be the output of the following C code?
|
A. | 10 |
B. | 15 |
C. | Garbage value |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
123. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Different memory address |
C. | Garbage value |
D. | Same memory address |
E. | None of these |
Answer» C. Garbage value | |
124. |
What will be the output of the following C code?
|
A. | Same memory address |
B. | Compilation Error |
C. | Different memory address |
D. | Garbage value |
E. | None of these |
Answer» C. Different memory address | |
125. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Same memory address |
C. | Different memory address |
D. | Varies |
E. | None of these |
Answer» C. Different memory address | |
126. |
What will be the output of the following C code?
|
A. | Undefined-value |
B. | 13 13 13 |
C. | Compilation Error |
D. | Segmentation fault/code-crash |
E. | None of these |
Answer» C. Compilation Error | |
127. |
What will be the output of the following C code?
|
A. | 16 16 |
B. | 15 15 |
C. | 15 16 |
D. | 16 15 |
E. | Compilation Error |
Answer» E. Compilation Error | |
128. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 16 15 13 21 |
C. | 21 13 15 16 |
D. | Runtime Error |
E. | None of these |
Answer» C. 21 13 15 16 | |
129. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | 10 12 |
C. | 12 10 |
D. | Garbage value |
E. | None of these |
Answer» D. Garbage value | |
130. |
What will be the output of the following C code?
|
A. | Interview Mania |
B. | Compilation Error |
C. | I M |
D. | M I |
E. | None of these |
Answer» D. M I | |
131. |
What will be the output of the following C code?
|
A. | Compilation Error |
B. | Same memory address is printed |
C. | Different memory address is printed |
D. | Nothing |
E. | None of these |
Answer» C. Different memory address is printed | |
132. |
What will be the output of the following C code?
|
A. | Different memory address is printed |
B. | Compilation Error |
C. | Nothing |
D. | Same memory address is printed |
E. | None of these |
Answer» E. None of these | |
133. |
What will be the output of the following C code?
|
A. | Garbage value |
B. | Runtime Error |
C. | 16 15 |
D. | 15 16 |
E. | Compilation Error |
Answer» F. | |
134. |
What will be the output of the following C code?
|
A. | 20 0 |
B. | Compilation Error |
C. | 20 Garbage value |
D. | 0 20 |
E. | None of these |
Answer» B. Compilation Error | |
135. |
What will be the output of the following C code?
|
A. | 11 |
B. | 12 |
C. | 13 |
D. | 14 |
E. | 15 |
Answer» F. | |
136. |
What are the elements present in the array of the following C code?
|
A. | 10, 10, 10, 10 |
B. | 0, 0, 0, 0 |
C. | 10, 0, 0, 0 |
D. | 0, garbage value, garbage value, garbage value |
E. | 10, garbage value, garbage value, garbage value |
Answer» D. 0, garbage value, garbage value, garbage value | |
137. |
What will be the output of the following C code?
|
A. | 11 |
B. | 21 |
C. | 31 |
D. | 51 |
E. | 50 |
Answer» F. | |
138. |
What will be the output of the following C code?
|
A. | 10 |
B. | 9 |
C. | 8 |
D. | 7 |
E. | 6 |
Answer» F. | |
139. |
What will be the output of the following C code?
|
A. | 100 100 |
B. | 10 100 |
C. | 100 10 |
D. | 30 100 |
E. | 100 30 |
Answer» F. | |
140. |
What will be the output of the following C code?
|
A. | A A |
B. | WATCH |
C. | Compilation Error |
D. | Garbage value |
E. | None of these |
Answer» B. WATCH | |
141. |
What will be the output of the following C code?
|
A. | WELCOME |
B. | Compilation Error |
C. | L W |
D. | W L |
E. | None of these |
Answer» D. W L | |
142. |
Comment on the following C statement.
|
A. | You can change the pointer as well as the value pointed by it |
B. | You May or maynot change the value pointed by p |
C. | You cannot change the pointer p itself |
D. | You cannot change the value pointed by p |
E. | None of these |
Answer» E. None of these | |
143. |
What will be the output of the following C code?
|
A. | 15 |
B. | 10 |
C. | 25, 25 |
D. | 15 10 |
E. | None of these |
Answer» D. 15 10 | |
144. |
What will be the output of the following C code?
|
A. | 100 100 |
B. | 101 100 |
C. | Garbage value |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
145. |
What will be the output of the following C code?
|
A. | Undefined behaviour |
B. | 58 |
C. | Segmentation fault/code crash |
D. | 12 12 |
E. | None of these |
Answer» E. None of these | |
146. |
What will be the output of the following C code?
|
A. | 0.000000 |
B. | Compilation Error |
C. | 14.000000 |
D. | Runtime Error |
E. | None of these |
Answer» B. Compilation Error | |
147. |
What will be the output of the following C code?
|
A. | 20 45 |
B. | 20 |
C. | 45 |
D. | 45 20 |
E. | Compilation Error |
Answer» B. 20 | |
148. |
What will be the output of the following C code?
|
A. | Garbage value |
B. | 101 |
C. | Segmentation fault |
D. | Compilation Error |
E. | None of these |
Answer» C. Segmentation fault | |
149. |
What will be the output of the program if the size of pointer is 4-bytes?
#include
|
A. | 2, 1 |
B. | 2, 2 |
C. | 4, 1 |
D. | 4, 2 |
Answer» D. 4, 2 | |
150. |
What will be the output of the program ?_x000D_
#include
|
A. | Error: cannot convert from void** to int** |
B. | Garbage value |
C. | 0 |
D. | No output |
Answer» D. No output | |