

MCQOPTIONS
This section includes 564 Mcqs, each offering curated multiple-choice questions to sharpen your Engineering knowledge and support exam preparation. Choose a topic below to get started.
151. |
A function that receives variable number of arguments should use va_arg() to extract the last argument from the variable argument list. |
A. | True |
B. | False |
Answer» C. | |
152. |
What will be the output of the program ?
|
A. | x=31, y=502, z=502 |
B. | x=31, y=500, z=500 |
C. | x=31, y=498, z=498 |
D. | x=31, y=504, z=504 |
Answer» E. | |
153. |
What will be the output of the program ?
|
A. | JCK |
B. | J65K |
C. | JAK |
D. | JACK |
Answer» E. | |
154. |
What will be the output of the program?
|
A. | -2, 3, 1, 1 |
B. | 2, 3, 1, 2 |
C. | 1, 2, 3, 1 |
D. | 3, 3, 1, 2 |
Answer» B. 2, 3, 1, 2 | |
155. |
It is necessary that a header files should have a .h extension? |
A. | Yes |
B. | No |
Answer» C. | |
156. |
How many bytes are occupied by near, far and huge pointers (DOS)? |
A. | near=2 far=4 huge=4 |
B. | near=4 far=8 huge=8 |
C. | near=2 far=4 huge=8 |
D. | near=4 far=4 huge=8 |
Answer» B. near=4 far=8 huge=8 | |
157. |
In a function two return statements should never occur. |
A. | Yes |
B. | No |
Answer» C. | |
158. |
Which of the statements is correct about the program?
|
A. | Output: Garbage value |
B. | Output: 1 |
C. | Output: 3 |
D. | Error: Invalid indirection |
Answer» E. | |
159. |
Which of the following is the correct order of evaluation for the below expression? |
A. | * / % + - = |
B. | = * / % + - |
C. | / * % - + = |
D. | * % / - + = |
Answer» B. = * / % + - | |
160. |
What will be the output of the program ?
|
A. | 7, 9, 11, 13, 15 |
B. | 2, 15, 6, 8, 10 |
C. | 2 4 6 8 10 |
D. | 3, 1, -1, -3, -5 |
Answer» C. 2 4 6 8 10 | |
161. |
Will the printf() statement print the same values for any values of a?
|
A. | Yes |
B. | No |
Answer» B. No | |
162. |
What will be the output of the program if the array begins 1200 in memory?
|
A. | 1200, 1202, 1204 |
B. | 1200, 1200, 1200 |
C. | 1200, 1204, 1208 |
D. | 1200, 1202, 1200 |
Answer» C. 1200, 1204, 1208 | |
163. |
Which of the following is correct way to define the function fun() in the below program?
|
A. | <pre><code class="cpp">void fun(int p[][4]) { } </code></pre> |
B. | <pre><code class="cpp">void fun(int *p[4]) { } </code></pre> |
C. | <pre><code class="cpp">void fun(int *p[][4]) { } </code></pre> |
D. | <pre><code class="cpp">void fun(int *p[3][4]) { } </code></pre> |
Answer» B. <pre><code class="cpp">void fun(int *p[4]) { } </code></pre> | |
164. |
Point out the error, if any in the program.
|
A. | 100 |
B. | 200 |
C. | Error: L value required for b |
D. | Garbage value |
Answer» D. Garbage value | |
165. |
Which of the following cannot be checked in a switch-case statement? |
A. | Character |
B. | Integer |
C. | Float |
D. | enum |
Answer» D. enum | |
166. |
Which of the following statements are correct about the program?
|
A. | Error: Statement missing |
B. | Error: Expression syntax |
C. | Error: Lvalue required |
D. | Error: Rvalue required |
Answer» B. Error: Expression syntax | |
167. |
What will be the output of the program?
|
A. | 1, 1, 1, 1 |
B. | 1, 1, 0, 1 |
C. | 1, 0, 0, 1 |
D. | 1, 0, 1, 1 |
Answer» E. | |
168. |
Are the following two statement same?
|
||||
A. | Yes | ||||
B. | No | ||||
Answer» C. | |||||
169. |
Macros have a local scope. |
A. | True |
B. | False |
Answer» C. | |
170. |
Which of the following correctly shows the hierarchy of arithmetic operations in C? |
A. | / + * - |
B. | * - / + |
C. | + - / * |
D. | / * + - |
Answer» E. | |
171. |
In which order do the following gets evaluated
|
||||||||
A. | 2134 | ||||||||
B. | 1234 | ||||||||
C. | 4321 | ||||||||
D. | 3214 | ||||||||
Answer» B. 1234 | |||||||||
172. |
Associativity has no role to play unless the precedence of operator is same. |
A. | True |
B. | False |
Answer» B. False | |
173. |
A short integer is at least 16 bits wide and a long integer is at least 32 bits wide. |
A. | True |
B. | False |
Answer» B. False | |
174. |
If the binary eauivalent of 5.375 in normalised form is 0100 0000 1010 1100 0000 0000 0000 0000, what will be the output of the program (on intel machine)?
|
A. | 40 AC 00 00 |
B. | 04 CA 00 00 |
C. | 00 00 AC 40 |
D. | 00 00 CA 04 |
Answer» D. 00 00 CA 04 | |
175. |
A header file contains macros, structure declaration and function prototypes. |
A. | True |
B. | False |
Answer» B. False | |
176. |
A float occupies 4 bytes. If the hexadecimal equivalent of these 4 bytes are A, B, C and D, then when this float is stored in memory in which of the following order do these bytes gets stored? |
A. | ABCD |
B. | DCBA |
C. | 0xABCD |
D. | Depends on big endian or little endian architecture |
Answer» E. | |
177. |
What will be the output of the program?
|
A. | 4, 4 |
B. | 3, 3 |
C. | 6, 6 |
D. | 12, 12 |
Answer» D. 12, 12 | |
178. |
In a macro call the control is passed to the macro. |
A. | True |
B. | False |
Answer» C. | |
179. |
What will be the output of the program ?
|
A. | Error |
B. | IndiaBIX |
C. | Base address of |
D. | <i class="C-code">str</i> |
E. | No output |
Answer» B. IndiaBIX | |
180. |
Which of the following function sets first n characters of a string to a given character? |
A. | strinit() |
B. | strnset() |
C. | strset() |
D. | strcset() |
Answer» C. strset() | |
181. |
What will be the output of the program ?
|
A. | Hello |
B. | HelloHello |
C. | No output |
D. | ello |
Answer» B. HelloHello | |
182. |
If the size of pointer is 4 bytes then What will be the output of the program ?
|
A. | 22, 4 |
B. | 25, 5 |
C. | 24, 5 |
D. | 20, 2 |
Answer» D. 20, 2 | |
183. |
What will be the output of the program (myprog.c) given below if it is executed from the command line?
|
A. | r |
B. | f |
C. | m |
D. | y |
Answer» B. f | |
184. |
Usually recursion works slower than loops. |
A. | Yes |
B. | No |
Answer» B. No | |
185. |
What will be the output of the program?
|
A. | 5 |
B. | 10 |
C. | Error |
D. | Garbage value |
Answer» D. Garbage value | |
186. |
Point out the error in the program (in Turbo-C).
|
A. | Error: unknown max in declaration/Constant expression required |
B. | Error: invalid array string |
C. | None of above |
D. | No error. It prints A A |
Answer» B. Error: invalid array string | |
187. |
A function may have any number of return statements each returning different values. |
A. | True |
B. | False |
Answer» B. False | |
188. |
Names of functions in two different files linked together must be unique |
A. | True |
B. | False |
Answer» B. False | |
189. |
Input/output function prototypes and macros are defined in which header file? |
A. | conio.h |
B. | stdlib.h |
C. | stdio.h |
D. | dos.h |
Answer» D. dos.h | |
190. |
What will be the output of the program ?
|
A. | BIX |
B. | India |
C. | India BIX |
D. | India 0BIX |
Answer» C. India BIX | |
191. |
What will be the output of the program in Turbo C (under DOS)?
|
A. | Error: Invalid structure assignment |
B. | DRAVID |
C. | Dravid |
D. | No output |
Answer» C. Dravid | |
192. |
Point out the error in the program?
|
A. | Error: in structure |
B. | Error: in prototype declaration unknown struct emp |
C. | No error |
D. | None of above |
Answer» C. No error | |
193. |
The '.' operator can be used access structure elements using a structure variable. |
A. | True |
B. | False |
Answer» B. False | |
194. |
Can we specify a variable filed width in a scanf() format string? |
A. | Yes |
B. | No |
Answer» C. | |
195. |
In a function that receives variable number of arguments the fixed arguments passed to the function can be at the end of argument list. |
A. | True |
B. | False |
Answer» C. | |
196. |
What is the purpose of fflush() function. |
A. | flushes all streams and specified streams. |
B. | flushes only specified stream. |
C. | flushes input/output buffer. |
D. | flushes file buffer. |
Answer» B. flushes only specified stream. | |
197. |
Point out the error in the program
|
A. | Error: unexpected end of file because there is no matching |
B. | <i class="C-code">#endif</i> |
C. | The number is odd |
D. | Garbage values |
E. | None of above |
Answer» B. <i class="C-code">#endif</i> | |
198. |
Does there exist any way to make the command-line arguments available to other functions without passing them as arguments to the function? |
A. | Yes |
B. | No |
Answer» B. No | |
199. |
Which of the following statements correct about the below program?
|
||||||||
A. | 1, 2 | ||||||||
B. | 2, 3 | ||||||||
C. | 1, 2, 3 | ||||||||
D. | 1, 3, 4 | ||||||||
Answer» D. 1, 3, 4 | |||||||||
200. |
Is there any difference int the following declarations? |
A. | Yes |
B. | No |
Answer» C. | |