

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.
401. |
Every C program will contain at least one preprocessor directive. |
A. | True |
B. | False |
Answer» C. | |
402. |
Preprocessor directive #ifdef .. #else ... #endif is used for conditional compilation. |
A. | True |
B. | False |
Answer» B. False | |
403. |
What will be the output of the program (sample.c) given below if it is executed from the command line?
|
A. | No output |
B. | sample Jan Feb Mar |
C. | Jan Feb Mar |
D. | Error |
Answer» D. Error | |
404. |
Macros with arguments are allowed |
A. | True |
B. | False |
Answer» B. False | |
405. |
Which of the following statements correctly assigns 12 to month using pointer variable pdt?
|
A. | pdt.month = 12 |
B. | &pdt.month = 12 |
C. | d.month = 12 |
D. | pdt->month = 12 |
Answer» E. | |
406. |
A union cannot be nested in a structure |
A. | True |
B. | False |
Answer» C. | |
407. |
Bit fields CANNOT be used in union. |
A. | True |
B. | False |
Answer» C. | |
408. |
one of elements of a structure can be a pointer to the same structure. |
A. | True |
B. | False |
Answer» B. False | |
409. |
A structure can be nested inside another structure. |
A. | True |
B. | False |
Answer» B. False | |
410. |
Point out the error in the program?
|
A. | Error: in structure declaration |
B. | Linker Error |
C. | No Error |
D. | None of above |
Answer» D. None of above | |
411. |
Point out the error in the program?
|
A. | Error: invalid structure member |
B. | Error: Floating point formats not linked |
C. | No error |
D. | None of above |
Answer» C. No error | |
412. |
What will be the output of the program ?
|
A. | 3, 2, 515 |
B. | 515, 2, 3 |
C. | 3, 2, 5 |
D. | 515, 515, 4 |
Answer» B. 515, 2, 3 | |
413. |
What will be the output of the program ?
|
A. | 1, 2, 13 |
B. | 1, 4, 4 |
C. | -1, 2, -3 |
D. | -1, -2, -13 |
Answer» D. -1, -2, -13 | |
414. |
What will be the output of the program ?
|
A. | -1, 0, 1, 2, 3, 4 |
B. | -1, 2, 6, 3, 4, 5 |
C. | -1, 0, 6, 2, 3, 4 |
D. | -1, 0, 6, 7, 8, 9 |
Answer» E. | |
415. |
What will be the output of the program in 16 bit platform (Turbo C under DOS) ?
|
A. | 1 |
B. | 2 |
C. | 4 |
D. | 9 |
Answer» C. 4 | |
416. |
What will be the output of the program (myprog.c) given below if it is executed from the command line?
|
A. | myprog one two three |
B. | myprog one |
C. | o |
D. | two |
Answer» D. two | |
417. |
What will be the output of the program (myprog.c) given below if it is executed from the command line?
|
A. | myprog |
B. | one |
C. | two |
D. | three |
Answer» C. two | |
418. |
What will be the output of the program (sample.c) given below if it is executed from the command line (turbo c under DOS)?
|
A. | 3 Good |
B. | 2 Good |
C. | Good Morning |
D. | 3 Morning |
Answer» B. 2 Good | |
419. |
What will be the output of the program
|
A. | 1 2 3 |
B. | 1 2 3 4 |
C. | 2 3 4 |
D. | 1 |
Answer» C. 2 3 4 | |
420. |
What will be the output of the program ?
|
A. | Alice |
B. | ecilA |
C. | Alice lice ice ce e |
D. | lice ice ce e |
Answer» E. | |
421. |
Macro calls and function calls work exactly similarly. |
A. | True |
B. | False |
Answer» C. | |
422. |
Every time we supply new set of values to the program at command prompt, we need to recompile the program. |
A. | True |
B. | False |
Answer» C. | |
423. |
If the size of integer is 4bytes, What will be the output of the program?
|
A. | 10, 2, 4 |
B. | 20, 4, 4 |
C. | 16, 2, 2 |
D. | 20, 2, 2 |
Answer» C. 16, 2, 2 | |
424. |
What will be the output of the program?
|
A. | a = 10, b = 12 |
B. | a = 12, b = 10 |
C. | Error: Declaration not allowed in macro |
D. | Error: Undefined symbol 't' |
Answer» C. Error: Declaration not allowed in macro | |
425. |
What will be the output of the program?
|
A. | int=2, int=3, int=4 |
B. | int=2, int=2, int=2 |
C. | int=3, int=3, int=3 |
D. | int=4, int=4, int=4 |
Answer» B. int=2, int=2, int=2 | |
426. |
What will be the output of the program?
|
A. | 10 |
B. | 20 |
C. | 1020 |
D. | 12 |
Answer» C. 1020 | |
427. |
What will be the output of the program?
|
A. | 8 |
B. | 9 |
C. | 6 |
D. | 5 |
Answer» C. 6 | |
428. |
What will be the output of the program ?
|
A. | IndiaBIX |
B. | BndiaBIdiaBIXia |
C. | India |
D. | (null) |
Answer» C. India | |
429. |
What will be the output of the program assuming that the array begins at location 1002?
|
A. | 1002, 2004, 4008, 2 |
B. | 2004, 4008, 8016, 1 |
C. | 1002, 1002, 1002, 1 |
D. | Error |
Answer» D. Error | |
430. |
What will be the output of the program ?
|
A. | peace |
B. | eace |
C. | ace |
D. | ce |
Answer» E. | |
431. |
What will be the output of the program ?
|
A. | 5 |
B. | 25 |
C. | 125 |
D. | Garbage value |
Answer» C. 125 | |
432. |
What will be the output of the program ?
|
A. | Error: in printf |
B. | Nothing will print |
C. | print "X" of IndiaBIX |
D. | print "7" |
Answer» D. print "7" | |
433. |
What will be the output of the program ?
|
A. | 10 |
B. | 20 |
C. | Error: Non portable pointer conversion |
D. | Error: cannot use static for function parameters |
Answer» E. | |
434. |
What will be the output of the program ?
|
A. | Error |
B. | No output |
C. | K |
D. | %s |
Answer» D. %s | |
435. |
Will the following program print the message infinite number of times?
|
A. | Yes |
B. | No |
Answer» B. No | |
436. |
Will it result in to an error if a header file is included twice? |
A. | Yes |
B. | No |
C. | It is compiler dependent. |
Answer» D. | |
437. |
What will be the output of the program?
|
A. | 2, 3 |
B. | 2, 0 |
C. | 2, Garbage value |
D. | 0, 0 |
Answer» C. 2, Garbage value | |
438. |
What will be the output of the program if the size of pointer is 4-bytes?
|
A. | 2, 1 |
B. | 2, 2 |
C. | 4, 1 |
D. | 4, 2 |
Answer» D. 4, 2 | |
439. |
What will be the output of the program ?
|
A. | llo |
B. | hello |
C. | ello |
D. | h |
Answer» C. ello | |
440. |
What will be the output of the program?
|
A. | 8, 10 |
B. | 10, 2 |
C. | 8, 1 |
D. | Garbage values |
Answer» B. 10, 2 | |
441. |
What will be the output of the program assuming that the array begins at the location 1002 and size of an integer is 4 bytes?
|
A. | 448, 4, 4 |
B. | 520, 2, 2 |
C. | 1006, 2, 2 |
D. | Error |
Answer» D. Error | |
442. |
Even if integer/float arguments are supplied at command prompt they are treated as strings. |
A. | True |
B. | False |
Answer» B. False | |
443. |
The first argument to be supplied at command-line must always be count of total arguments. |
A. | True |
B. | False |
Answer» C. | |
444. |
Which of the following is TRUE about argv? |
A. | It is an array of character pointers |
B. | It is a pointer to an array of character pointers |
C. | It is an array of strings |
D. | None of above |
Answer» B. It is a pointer to an array of character pointers | |
445. |
What will be the output of the program?
|
A. | 9, 4 |
B. | 27, 4 |
C. | 27, 6 |
D. | Error |
Answer» D. Error | |
446. |
Point out the error in the program
|
A. | 26250.00 7500.00 |
B. | Nothing will print |
C. | Error: Multiple declaration of |
D. | <i class="C-code">si</i> |
E. | Garbage values |
Answer» D. <i class="C-code">si</i> | |
447. |
What will be the output of the program?
|
A. | 12, 6, 12 |
B. | 11, 5, 11 |
C. | 11, 5, Garbage |
D. | 12, 6, Garbage |
Answer» B. 11, 5, 11 | |
448. |
What will be the output of the program?
|
A. | 25 |
B. | 11 |
C. | Error |
D. | Garbage value |
Answer» C. Error | |
449. |
What will be the output of the program?
|
A. | str1=IndiaBIX str2=BIX |
B. | str1=India str2=BIX |
C. | str1=India str2=IndiaBIX |
D. | Error: in macro substitution |
Answer» C. str1=India str2=IndiaBIX | |
450. |
A text stream is an ordered sequence of characters composed into lines, each line consisting of zero or more characters plus a terminating new-line character. |
A. | True |
B. | False |
Answer» B. False | |