

MCQOPTIONS
Saved Bookmarks
This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your C Multiple Choice knowledge and support exam preparation. Choose a topic below to get started.
1. |
What is the return value of putchar()? |
A. | The character written |
B. | EOF if an error occurs |
C. | Nothing |
D. | Both character written & EOF if an error occurs |
Answer» E. | |
2. |
What is the use of getchar()? |
A. | The next input character each time it is called |
B. | EOF when it encounters end of file |
C. | The next input character each time it is called EOF when it encounters end of file |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
3. |
What is the value of EOF? |
A. | -1 |
B. | 0 |
C. | 1 |
D. | 10 |
Answer» B. 0 | |
4. |
It runs prog1 first, prog2 second |
A. | It runs prog2 first, prog1 second |
B. | It runs both the programs, pipes output of prog1 to input of prog2 |
C. | It runs both the programs, pipes output of prog2 to input of prog1 |
Answer» D. | |
5. |
For a typical program, the input is taken using _________ |
A. | scanf |
B. | Files |
C. | Command-line |
D. | All of the mentioned |
Answer» E. | |