

MCQOPTIONS
Saved Bookmarks
This section includes 19 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. | 45 |
B. | 2d |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» C. Compilation Error | |
2. |
What is the output of this program?
|
A. | 66 |
B. | B |
C. | Bjarne Stroustrup |
D. | Compilation Error |
E. | None of these |
Answer» B. B | |
3. |
What is the output of this program?
|
A. | 6.1250024 |
B. | 6.125 |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» C. Compilation Error | |
4. |
What is the output of this program?
|
A. | 100 |
B. | Compilation Error |
C. | Depends on entered value |
D. | Runtime Error |
E. | Garbage value |
Answer» D. Runtime Error | |
5. |
What is the output of this program?
|
A. | Please enter a Number |
B. | 10 |
C. | 15 |
D. | Compilation Error |
E. | Runtime Error |
Answer» E. Runtime Error | |
6. |
What is the output of this program?
|
A. | 25 |
B. | -25 |
C. | - 25 |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
7. |
What is the output of this program in the Example.txt file?
|
A. | This is a Sample |
B. | Ex |
C. | Example.txt |
D. | This is a Example |
E. | None of these |
Answer» E. None of these | |
8. |
What is the output of this program?
|
A. | 50 |
B. | p |
C. | Compilation Error |
D. | It will print what we enter till character p is encountered in the input data |
E. | None of these |
Answer» E. None of these | |
9. |
What is the output of this program?
|
A. | First Any Number or String: |
B. | Clearing cin Data. |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» F. | |
10. |
When will the cin can start processing of input? |
A. | After pressing any key |
B. | After pressing return key |
C. | BY pressing blank space |
D. | After pressing return key & BY pressing blank space |
E. | None of these |
Answer» C. BY pressing blank space | |
11. |
How many groups of output of operation are there in c++? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» D. 1 | |
12. |
Which is used to get the input during runtime? |
A. | coi |
B. | cout |
C. | cin |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
13. |
Where does a cin stops it extraction of data? |
A. | By seeing ( |
B. | By seeing a blank space & ( |
C. | By seeing a blank space |
D. | All of above |
E. | None of these |
Answer» C. By seeing a blank space | |
14. |
Which operator is used for input stream? |
A. | < |
B. | > |
C. | << |
D. | >> |
E. | None of these |
Answer» C. << | |
15. |
What must be specified when we construct an object of class ostream? |
A. | memory |
B. | stream |
C. | streambuf |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
16. |
How many types of output stream classes are there in c++? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» C. 2 | |
17. |
What is the output of this program in the Example.txt file? |
A. | This is a Sample |
B. | Ex |
C. | Example.txt |
D. | This is a Example |
E. | None of these |
Answer» E. None of these | |
18. |
What can be used to input a string with blank space? |
A. | putline |
B. | inline |
C. | getline |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
19. |
How many parameters are there in getline function? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
E. | 2 or 3 |
Answer» F. | |