

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.
301. |
Which of the following statements are correct about the below program?
|
A. | Error: Expression syntax |
B. | Error: Lvalue required |
C. | Error: Rvalue required |
D. | The Code runs successfully |
Answer» C. Error: Rvalue required | |
302. |
Is standard library a part of C language? |
A. | Yes |
B. | No |
Answer» C. | |
303. |
The itoa function can convert an integer in decimal, octal or hexadecimal form to a string. |
A. | Yes |
B. | No |
Answer» B. No | |
304. |
The prototypes of all standard library string functions are declared in the file string.h. |
A. | Yes |
B. | No |
Answer» B. No | |
305. |
scanf() or atoi() function can be used to convert a string like "436" in to integer. |
A. | Yes |
B. | No |
Answer» B. No | |
306. |
It is necessary that for the string functions to work safely the strings must be terminated with ' 0'. |
A. | True |
B. | False |
Answer» B. False | |
307. |
FILE is a structure suitably typedef'd in "stdio.h". |
A. | True |
B. | False |
Answer» B. False | |
308. |
ftell() returns the current position of the pointer in a file stream. |
A. | True |
B. | False |
Answer» B. False | |
309. |
Data written into a file using fwrite() can be read back using fscanf() |
A. | True |
B. | False |
Answer» C. | |
310. |
If the two strings are found to be unequal then strcmp returns difference between the first non-matching pair of characters. |
A. | True |
B. | False |
Answer» B. False | |
311. |
What will be the output of the program?
|
A. | 2, 3 |
B. | 2.000000, 3 |
C. | 2.000000, 0 |
D. | 2, 0 |
Answer» D. 2, 0 | |
312. |
What will be the output of the program?
|
A. | Missed |
B. | Got it |
C. | Error in memcmp statement |
D. | None of above |
Answer» C. Error in memcmp statement | |
313. |
What will function gcvt() do? |
A. | Convert vector to integer value |
B. | Convert floating-point number to a string |
C. | Convert 2D array in to 1D array. |
D. | Covert multi Dimensional array to 1D array |
Answer» C. Convert 2D array in to 1D array. | |
314. |
What will be the output of the program?
|
A. | 12400 |
B. | 12480 |
C. | 12500 |
D. | 12556 |
Answer» C. 12500 | |
315. |
What will be the output of the program ?
|
A. | 0, 0, 0, 0, 0 |
B. | 0, 32, 32, 32, 32 |
C. | 32, 32, 32, 32, 0 |
D. | 32, 32, 32, 32, 32 |
Answer» D. 32, 32, 32, 32, 32 | |
316. |
What will be the output of the program?
|
A. | It matters |
B. | It doesn't matters |
C. | matters |
D. | No output |
Answer» C. matters | |
317. |
What will be the output of the program ?
|
A. | 4, 8, 0 |
B. | 1, 2, 1 |
C. | 12, 1, 12 |
D. | 0, 0, 0 |
Answer» D. 0, 0, 0 | |
318. |
What will be the output of the program?
|
A. | 4 1 8 1 |
B. | 4 >> 1 8 >> 1 |
C. | 2 >> 4 Garbage value >> Garbage value |
D. | 2 4 |
Answer» D. 2 4 | |
319. |
What will be the output of the program?
|
A. | 0, 1, 3 |
B. | 1, 2, 3 |
C. | 3, 1, 3 |
D. | 1, 3, 1 |
Answer» D. 1, 3, 1 | |
320. |
What will be the output of the program?
|
A. | 200 |
B. | 30 |
C. | 100 |
D. | 500 |
Answer» C. 100 | |
321. |
What will be the output of the program?
|
A. | 300, 300, 200 |
B. | Garbage, 300, 200 |
C. | 300, Garbage, 200 |
D. | 300, 300, Garbage |
Answer» D. 300, 300, Garbage | |
322. |
What will be the output of the program?
|
A. | y =20 |
B. | x = 0 |
C. | x = 10 |
D. | x = 1 |
Answer» D. x = 1 | |
323. |
What will be the output of the program?
|
A. | Infinite loop |
B. | 0 1 2 ... 65535 |
C. | 0 1 2 ... 32767 - 32766 -32765 -1 0 |
D. | No output |
Answer» E. | |
324. |
Bitwise can be used to perform addition and subtraction. |
A. | Yes |
B. | No |
Answer» C. | |
325. |
Bitwise | can be used to set a bit in number. |
A. | Yes |
B. | No |
Answer» B. No | |
326. |
What will be the output of the program?
|
A. | 1 2 3 ... 127 |
B. | 1 2 3 ... 255 |
C. | 1 2 3 ... 127 128 0 1 2 3 ... infinite times |
D. | 1, 2, 3, 4 |
Answer» E. | |
327. |
What will be the output of the program?
|
A. | Error: Misplaced continue |
B. | Bye |
C. | No output |
D. | Hello Hi |
Answer» B. Bye | |
328. |
What will be the output of the program?
|
A. | x=2, y=1, z=1 |
B. | x=2, y=2, z=1 |
C. | x=2, y=2, z=2 |
D. | x=1, y=2, z=1 |
Answer» B. x=2, y=2, z=1 | |
329. |
What will be the output of the program?
|
A. | 55, 55.555 |
B. | 66, 66.666600 |
C. | 65, 66.666000 |
D. | 55, 55 |
Answer» D. 55, 55 | |
330. |
Left shifting a number by 1 is always equivalent to multiplying it by 2. |
A. | True |
B. | False |
Answer» B. False | |
331. |
In the statement expression1 >> expression2. if expression1 is a signed integer with its leftmost bit set to 1 then on right shifting it the result of the statement will vary from computer to computer |
A. | True |
B. | False |
Answer» B. False | |
332. |
Bitwise & and | are unary operators |
A. | True |
B. | False |
Answer» C. | |
333. |
Bitwise & can be used to check if more than one bit in a number is on. |
A. | True |
B. | False |
Answer» B. False | |
334. |
Assunming, integer is 2 byte, What will be the output of the program?
|
A. | ffff |
B. | 0fff |
C. | 0000 |
D. | fff0 |
Answer» B. 0fff | |
335. |
If an unsigned int is 2 bytes wide then, What will be the output of the program ?
|
A. | ffff |
B. | 0000 |
C. | ffdf |
D. | ddfd |
Answer» D. ddfd | |
336. |
Assuming a integer 2-bytes, What will be the output of the program?
|
A. | ffff |
B. | fff8 |
C. | 0 |
D. | -1 |
Answer» C. 0 | |
337. |
If an unsigned int is 2 bytes wide then, What will be the output of the program ?
|
A. | ffff |
B. | 0000 |
C. | 00ff |
D. | ddfd |
Answer» B. 0000 | |
338. |
What will be the output of the program?
|
A. | 0 |
B. | 256 |
C. | 100 |
D. | 80 |
Answer» C. 100 | |
339. |
Bitwise can be used to generate a random number. |
A. | Yes |
B. | No |
Answer» C. | |
340. |
Bitwise | can be used to set multiple bits in number. |
A. | Yes |
B. | No |
Answer» B. No | |
341. |
Bitwise can be used to reverse a sign of a number. |
A. | Yes |
B. | No |
Answer» C. | |
342. |
Bitwise & can be used in conjunction with ~ operator to turn off 1 or more bits in a number. |
A. | Yes |
B. | No |
Answer» B. No | |
343. |
On left shifting, the bits from the left are rotated and brought to the right and accommodated where there is empty space on the right? |
A. | True |
B. | False |
Answer» C. | |
344. |
Left shifting an unsigned int or char by 1 is always equivalent to multiplying it by 2. |
A. | True |
B. | False |
Answer» B. False | |
345. |
What will be the output of the program?
|
A. | C-program |
B. | Ps |
C. | Error |
D. | None of above |
Answer» B. Ps | |
346. |
Bitwise & can be used to divide a number by powers of 2 |
A. | True |
B. | False |
Answer» C. | |
347. |
What will be the output of the program?
|
A. | 0, 1, 2, 3, 4, 5 |
B. | 5 |
C. | 1, 2, 3, 4 |
D. | 6 |
Answer» E. | |
348. |
What will be the output of the program ?
|
A. | 0 |
B. | 1 |
C. | 2 |
D. | 4 |
Answer» B. 1 | |
349. |
What will be the output of the program?
|
A. | b = 300 c = 200 |
B. | b = 100 c = garbage |
C. | b = 300 c = garbage |
D. | b = 100 c = 200 |
Answer» E. | |
350. |
What will be the output of the program?
|
A. | Infinite loop |
B. | 0 1 2 ... 65535 |
C. | 0 1 2 ... 32767 - 32766 -32765 -1 0 |
D. | No output |
Answer» B. 0 1 2 ... 65535 | |