

MCQOPTIONS
Saved Bookmarks
This section includes 22 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 is the output of this program?
|
A. | Depends upon the file |
B. | 50 |
C. | 100 |
D. | 20 |
E. | None of these |
Answer» B. 50 | |
2. |
By seeing which operator thus this program stops getting the input?
|
A. | $ symbol |
B. | dot operator |
C. | insertion operator |
D. | All of above |
E. | None of these |
Answer» C. insertion operator | |
3. |
What is the output of this program?
|
A. | Third |
B. | Second |
C. | First |
D. | Returns first 3 letter or number from the entered word |
E. | None of these |
Answer» E. None of these | |
4. |
What is the output of this program?
|
A. | Example.text |
B. | This is example |
C. | Example |
D. | Compilation Error |
E. | Runtime Error |
Answer» F. | |
5. |
What is the output of this program?
|
A. | 150 6.251 937.65 |
B. | 150 6.251 |
C. | 937.65 |
D. | 150 |
E. | None of these |
Answer» B. 150 6.251 | |
6. |
What is the output of this program?
|
A. | compilation Error |
B. | Runtime Error |
C. | Garbage value |
D. | Done successfully |
E. | None of these |
Answer» E. None of these | |
7. |
What is the output of this program in text files?
|
A. | Compilation Error |
B. | Buffered stream |
C. | Unbuffered stream |
D. | Buffered & Unbuffered stream |
E. | None of these |
Answer» E. None of these | |
8. |
What is the output of this program in the text file?
|
A. | I |
B. | L |
C. | U |
D. | ILU |
E. | None of these |
Answer» E. None of these | |
9. |
What is the output of this program?
|
A. | ABC |
B. | EFTLM |
C. | ABCDE |
D. | ABCD |
E. | None of these |
Answer» B. EFTLM | |
10. |
What is the output of this program in the file?
|
A. | This is redirected |
B. | Compilation Error |
C. | This is redirected to a file |
D. | Sample.txt |
E. | None of these |
Answer» D. Sample.txt | |
11. |
What is the output of this program in the text file? |
A. | I |
B. | L |
C. | U |
D. | ILU |
E. | None of these |
Answer» E. None of these | |
12. |
What is the output of this program in text files? |
A. | Compilation Error |
B. | Buffered stream |
C. | Unbuffered stream |
D. | Buffered & Unbuffered stream |
E. | None of these |
Answer» E. None of these | |
13. |
What will act as a intermediate between i/o operations and physical file? |
A. | Stream buffer |
B. | Memory |
C. | Ram |
D. | All of above |
E. | None of these |
Answer» B. Memory | |
14. |
How many tests are available in read and write operations? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» D. 1 | |
15. |
Which one is always faster in writing on C++? |
A. | Writing to memory |
B. | Reading from the network |
C. | Writing to a file |
D. | All of above |
E. | None of these |
Answer» B. Reading from the network | |
16. |
Which operator is used to insert the data into file? |
A. | < |
B. | >> |
C. | << |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
17. |
Which header file is used for reading and writing to a file? |
A. | #include <fstream> |
B. | #include <file> |
C. | #include <iostream> |
D. | All of above |
E. | None of these |
Answer» B. #include <file> | |
18. |
Which member function is used to determine whether the stream object is currently associated with a file? |
A. | buf |
B. | string |
C. | is_open |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
19. |
By seeing which operator thus this program stops getting the input? |
A. | $ symbol |
B. | dot operator |
C. | insertion operator |
D. | All of above |
E. | None of these |
Answer» C. insertion operator | |
20. |
What is the output of this program in the file? |
A. | This is redirected |
B. | Compilation Error |
C. | This is redirected to a file |
D. | Sample.txt |
E. | None of these |
Answer» D. Sample.txt | |
21. |
How many parameters are available in the function setbuf? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» D. 1 | |
22. |
By using which function does the buffer are automatically flushed? |
A. | fclose |
B. | compare |
C. | copy |
D. | fopen |
E. | None of these |
Answer» B. compare | |