

MCQOPTIONS
Saved Bookmarks
This section includes 160 Mcqs, each offering curated multiple-choice questions to sharpen your C++ Programming knowledge and support exam preparation. Choose a topic below to get started.
51. |
What is the output of this program?
|
A. | 12 |
B. | 25 |
C. | 13 |
D. | All of above |
E. | None of these |
Answer» C. 13 | |
52. |
What is the output of this program?
|
A. | 45 |
B. | 25 |
C. | 5 |
D. | Compilation Error |
E. | None of these |
Answer» B. 25 | |
53. |
What is the output of this program?
|
A. | 0 1 |
B. | 0 1 2 |
C. | 0 1 2 3 |
D. | 0 1 2 3 4 |
E. | 0 1 2 3 4 5 |
Answer» F. | |
54. |
What is the output of this program?
|
A. | 75 65 55 45 25 |
B. | 75 65 55 45 |
C. | 75 65 55 |
D. | 75 65 |
E. | 75 |
Answer» B. 75 65 55 45 | |
55. |
What is the output of this program?
|
A. | 75 |
B. | 1275 |
C. | 12 |
D. | Compilation Error |
E. | None of these |
Answer» C. 12 | |
56. |
What is the output of this program?
|
A. | 15 |
B. | 45 |
C. | 30 |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
57. |
What is the output of this program?
|
A. | 10.05 3.70 12.02 10.25 |
B. | 14.24 11.47 76.32 82.35 |
C. | 82.35 95.31 52.95 |
D. | 3.7 10.05 76.32 82.35 |
E. | None of these |
Answer» E. None of these | |
58. |
What is the output of this program?
|
A. | 0 1 |
B. | 0 1 2 |
C. | 0 1 2 3 |
D. | 0 1 2 3 4 |
E. | 0 1 2 3 4 5 |
Answer» F. | |
59. |
What is the output of this program?
|
A. | 50 75 |
B. | 75 90 |
C. | 90 150 |
D. | 150 175 |
E. | None of these |
Answer» E. None of these | |
60. |
What is the output of this program?
|
A. | 6 5 |
B. | 6 5 4 |
C. | 6 5 4 3 |
D. | 6 5 4 3 2 |
E. | 6 5 4 3 2 1 |
Answer» F. | |
61. |
What is the output of this program?
|
A. | 30 15 0 150 0 0 |
B. | 30 15 0 150 0 |
C. | 30 15 0 150 |
D. | 30 15 0 |
E. | 30 15 |
Answer» B. 30 15 0 150 0 | |
62. |
What is the output of this program?
|
A. | 60 |
B. | 12 |
C. | 10 |
D. | Compilation Error |
E. | None of these |
Answer» B. 12 | |
63. |
What is the output of this program?
|
A. | Compilation Error |
B. | Runtime Error |
C. | Garbage value |
D. | 15 |
E. | 16 |
Answer» F. | |
64. |
What is the output of this program?
|
A. | Compilation Error |
B. | Runtime Error |
C. | Garbage value |
D. | Weekly Hours: 0 |
E. | Weekly Hours: 26.25 |
Answer» F. | |
65. |
What is the output of this program?
|
A. | 10 |
B. | 120 |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» B. 120 | |
66. |
What will be the output of these two programs?
#define Example_H int n = 251; #endif #include "Example.h" using namespace std; int main(int argc, char * argv[] ) { cout << num++; return 0; } |
A. | 252 |
B. | 251 |
C. | Compilation Error |
D. | Runtime Error |
E. | None of these |
Answer» C. Compilation Error | |
67. |
What is the output of this program?
|
A. | Interview Mania12 |
B. | 25Interview Mania |
C. | Compilation Error |
D. | Garbage Value |
E. | Runtime Error |
Answer» D. Garbage Value | |
68. |
What is the output of this program?
|
A. | Runtime Error |
B. | Garbage value |
C. | Exception occur |
D. | Compilation Error |
E. | None of these |
Answer» E. None of these | |
69. |
What is the output of this program?
|
A. | 2850 |
B. | No Space |
C. | Depends on the compiler |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
70. |
What is the output of this program?
|
A. | 5 |
B. | 50 |
C. | 20 |
D. | 40 |
E. | None of these |
Answer» B. 50 | |
71. |
What is the output of this program?
|
A. | 4 5 6 7 |
B. | 8 9 10 11 |
C. | 12 13 14 15 |
D. | 16 17 18 19 |
E. | None of these |
Answer» F. | |
72. |
What is the output of this program?
|
A. | Compilation Error |
B. | Who are u? |
C. | Runtime Error |
D. | segmentation fault |
E. | None of these |
Answer» E. None of these | |
73. |
What is the output of this program?
|
A. | Null pointer on first type-cast |
B. | Null pointer on second type-cast |
C. | Exception: |
D. | All of above |
E. | None of these |
Answer» C. Exception: | |
74. |
What is the output of this program?
|
A. | 9BaseClass |
B. | 12DerivedClass |
C. | 9 12 |
D. | Both 9BaseClass and 12DerivedClass |
E. | None of these |
Answer» E. None of these | |
75. |
What is the output of this program?
|
A. | i iP |
B. | iP i |
C. | Pi i |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
76. |
What is the output of this program?
|
A. | NULL |
B. | Compilation Error |
C. | Runtime Error |
D. | Object is NULL |
E. | None of these |
Answer» E. None of these | |
77. |
What is the output of this program?
|
A. | 50 |
B. | 150 |
C. | 200 |
D. | 400 |
E. | None of these |
Answer» E. None of these | |
78. |
What is the output of this program?
|
A. | 10 12 71 38 |
B. | 10 12 71 |
C. | 10 12 |
D. | 10 |
E. | None of these |
Answer» B. 10 12 71 | |
79. |
What is the output of this program?
|
A. | 12 |
B. | Compilation Error |
C. | Runtime Error |
D. | 5 |
E. | None of these |
Answer» B. Compilation Error | |
80. |
What is the output of this program?
|
A. | 3 |
B. | 7 |
C. | 7 7 |
D. | 7 7 7 |
E. | None of these |
Answer» E. None of these | |
81. |
What is the output of this program?
|
A. | 12345678910 |
B. | 012345678910 |
C. | 109876543210 |
D. | Compilation Error |
E. | None of these |
Answer» B. 012345678910 | |
82. |
What is the output of this program?
|
A. | 25 |
B. | 12 |
C. | 50 |
D. | Compilation Error |
E. | None of these |
Answer» D. Compilation Error | |
83. |
What is the use of vector arithmetic in c++? |
A. | Webdesign |
B. | Computer graphics |
C. | Computer booting |
D. | Both Computer graphics & Computer booting |
E. | None of these |
Answer» C. Computer booting | |
84. |
Which function is used to optimize the space in vector? |
A. | operator |
B. | at |
C. | bool |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
85. |
What will be the type of output of vector cross product? |
A. | function |
B. | Scalar |
C. | Vector |
D. | Both Scalar & Vector |
E. | None of these |
Answer» D. Both Scalar & Vector | |
86. |
What is meant by permutation in c++? |
A. | To find all the combination of the range |
B. | To find all the values & combination in the range |
C. | To find all the values in the range |
D. | All of above |
E. | None of these |
Answer» B. To find all the values & combination in the range | |
87. |
What is meant by hash tables in C++? |
A. | Data structure |
B. | Array data structure |
C. | Keyed array data structure |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
88. |
How many categories of iterators are there in c++? |
A. | 5 |
B. | 4 |
C. | 3 |
D. | 2 |
E. | 1 |
Answer» B. 4 | |
89. |
How many parameters are required for sort_heap function? |
A. | 2 |
B. | 2 or 3 |
C. | 3 |
D. | 1 |
E. | None of these |
Answer» C. 3 | |
90. |
What type of algorithm is not available in creating our own STL style algorithms? |
A. | sort |
B. | copy_if() |
C. | remove_copy_if() |
D. | All of above |
E. | None of these |
Answer» C. remove_copy_if() | |
91. |
Pick out the in correct type of function in header file. |
A. | Sort |
B. | Join |
C. | Partitions |
D. | Merge |
E. | None of these |
Answer» C. Partitions | |
92. |
How many parameters are required for next_permutation? |
A. | 3 |
B. | 2 |
C. | 1 |
D. | 2 or 3 |
E. | None of these |
Answer» E. None of these | |
93. |
What is the header file for vector permutation? |
A. | <algorithm> |
B. | vector_permutation |
C. | vector_perm |
D. | vector_permutation.h |
E. | None of these |
Answer» B. vector_permutation | |
94. |
How many adaptors support the checked iterators? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» D. 1 | |
95. |
What will happen if the iterator is unchecked? |
A. | Arising of compiler warnings & Unchecked behavior on program |
B. | Nothing will execute |
C. | Unchecked behavior on program |
D. | Arising of compiler warnings |
E. | None of these |
Answer» B. Nothing will execute | |
96. |
What type of reference should be used in vector arithmetic? |
A. | Single |
B. | dynamic |
C. | const |
D. | both dynamic & const |
E. | None of these |
Answer» D. both dynamic & const | |
97. |
What is the use of checked iterators? |
A. | It will check the list value |
B. | Overwrite the bounds of your container |
C. | Not allow you to overwrite the bounds of your container |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
98. |
By using which operator does point to next element is represent in iterator? |
A. | |
B. | +- |
C. | ++ |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
99. |
In which type of semantics does c++ implements iterator? |
A. | Pointer |
B. | Memory |
C. | Size |
D. | All of above |
E. | None of these |
Answer» B. Memory | |
100. |
Which header file is used to manipulate the vector algebra in c++? |
A. | vmath |
B. | math |
C. | cmath |
D. | All of above |
E. | None of these |
Answer» B. math | |