

MCQOPTIONS
Saved Bookmarks
This section includes 12 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 happens when we use the following C statement?
|
A. | The diagnostic output is pipelined to the output file |
B. | The program is immediately aborted |
C. | The diagnostic output is directly displayed in the output |
D. | The line which caused error is compiled again |
E. | None of these |
Answer» D. The line which caused error is compiled again | |
2. |
What will be the output of the following C code?
|
A. | Whatever user types |
B. | Compilation error |
C. | Undefined behaviour |
D. | Nothing |
E. | None of these |
Answer» B. Compilation error | |
3. |
What will be the output of the following C code?
|
A. | Undefined behaviour |
B. | Garbage value |
C. | Interveiw Mania |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
4. |
What will be the output of the following C code?
|
A. | Prints to the screen content of file1.txt completely |
B. | Prints to the screen some contents of newfile1.txt |
C. | Compilation error |
D. | Segmentation fault |
E. | None of these |
Answer» E. None of these | |
5. |
What is the purpose of the C function?
|
A. | They check for error in accessing the file |
B. | They check for all types of errors |
C. | They check for input errors |
D. | They check for output errors |
E. | None of these |
Answer» E. None of these | |
6. |
What is the output of the following C code if there is no error in stream fp?
|
A. | 1 |
B. | Compilation Error |
C. | 0 |
D. | Garbage value |
E. | Any nonzero value |
Answer» D. Garbage value | |
7. |
What will be the output of the following C statement?
|
A. | The diagnostic output is pipelined to the output file |
B. | The program is immediately aborted |
C. | The diagnostic output is directly displayed in the output |
D. | The line which caused error is compiled again |
E. | None of these |
Answer» D. The line which caused error is compiled again | |
8. |
What will be the output of the following C statement? |
A. | The diagnostic output is pipelined to the output file |
B. | The program is immediately aborted |
C. | The diagnostic output is directly displayed in the output |
D. | The line which caused error is compiled again |
E. | None of these |
Answer» D. The line which caused error is compiled again | |
9. |
What is the purpose of the C function? |
A. | They check for output errors |
B. | They check for all types of errors |
C. | They check for error in accessing the file |
D. | They check for input errors |
E. | None of these |
Answer» B. They check for all types of errors | |
10. |
What happens when we use the following C statement? |
A. | The diagnostic output is pipelined to the output file |
B. | The program is immediately aborted |
C. | The diagnostic output is directly displayed in the output |
D. | The line which caused error is compiled again |
E. | None of these |
Answer» D. The line which caused error is compiled again | |
11. |
Which of the following function can be used to terminate the main function from another function safely? |
A. | exit(expr); |
B. | abort(); |
C. | both exit(expr); and abort(); |
D. | return(expr); |
E. | None of these |
Answer» B. abort(); | |
12. |
What is the output of the following C code if there is no error in stream fp? |
A. | 1 |
B. | Compilation Error |
C. | 0 |
D. | Garbage value |
E. | Any nonzero value |
Answer» D. Garbage value | |