

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.
101. |
Which of the following library is used to do vector arithmetic? |
A. | OpenGL |
B. | Boost |
C. | Time |
D. | All of above |
E. | None of these |
Answer» C. Time | |
102. |
What kind of errors do checked iterators detect? |
A. | Initialized iterators |
B. | Uninitialized iterators |
C. | Range access |
D. | Both Uninitialized iterators and range access |
E. | None of these |
Answer» E. None of these | |
103. |
What does the checked iterator allow you to find? |
A. | Run time error |
B. | Warnings |
C. | Compile time error |
D. | All of above |
E. | None of these |
Answer» B. Warnings | |
104. |
What is the use of includes function in c++? |
A. | Includes a new element in the range |
B. | Compares two ranges of data |
C. | Compares two sorted ranges of data |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
105. |
How many types are there in binary heaps? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» D. 1 | |
106. |
In what form does the STL provides heap? |
A. | list |
B. | vector |
C. | priority_queue |
D. | queue |
E. | None of these |
Answer» D. queue | |
107. |
What do all STL containers define? |
A. | Begin methods |
B. | End methods |
C. | Iterator types |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
108. |
What is the header file used for declaring the standard library algorithms? |
A. | algorithm |
B. | library |
C. | container |
D. | All of above |
E. | None of these |
Answer» B. library | |
109. |
What is the use of make_heap in the heap operation? |
A. | Deform a heap |
B. | Form a heap |
C. | Rearrange a heap |
D. | All of above |
E. | None of these |
Answer» C. Rearrange a heap | |
110. |
How many kind of operation can be applied to transform method in c++? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» D. 1 | |
111. |
What operator is used to remove the dupplicates in the range? |
A. | == |
B. | % |
C. | ^ |
D. | ) |
E. | None of these |
Answer» B. % | |
112. |
What is meant by sequence point? |
A. | Represent the beginning of the program |
B. | Represent the point of execution in the program |
C. | Represent the whole program |
D. | All of above |
E. | None of these |
Answer» C. Represent the whole program | |
113. |
How to protect the heap from affecting the memory? |
A. | Allocate objects in chunks |
B. | Avoid using pointers for associating two data structures |
C. | Embed pointed child objects into the parent object |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
114. |
Which is used to iterate over container? |
A. | Data type of objects |
B. | Return type of variables |
C. | Associated iterator type |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
115. |
How does a sequence of objects are accessed in c++? |
A. | function |
B. | Iterators |
C. | Pointers |
D. | Both Iterators & Pointers |
E. | None of these |
Answer» E. None of these | |
116. |
What is the use of adapter in STL in c++? |
A. | To manipulate the data |
B. | To extract the data |
C. | To provide interface |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
117. |
Pick out the incorrect method in non-modifying sequence algorithm? |
A. | like |
B. | any-of |
C. | none-of |
D. | find-if |
E. | None of these |
Answer» B. any-of | |
118. |
To what kind of elements does non-modifying sequence algorithm can be applied? |
A. | List |
B. | Range |
C. | Vector |
D. | All of above |
E. | None of these |
Answer» C. Vector | |
119. |
What is the use of middle parameter in rotate method? |
A. | Marks the ending of a sequence |
B. | Marks the elements in a sequence |
C. | Marks the begining of a sequence |
D. | All of above |
E. | None of these |
Answer» C. Marks the begining of a sequence | |
120. |
When does the next sequence point start? |
A. | It is a beginning statement |
B. | At the beginning |
C. | After a terminating semicolon |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
121. |
What will happen in all_of method if the range is empty? |
A. | Return nothing |
B. | Return true |
C. | Return false |
D. | All of above |
E. | None of these |
Answer» C. Return false | |
122. |
What kind of iteration does forward_list provide in C++? |
A. | Bi-directional |
B. | Multi-directional |
C. | Uni-directional |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
123. |
Pick out the correct library in the following choices. |
A. | Numeric |
B. | Search |
C. | Generate |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
124. |
What is the type of the first item in the heap? |
A. | Mean value of the heap |
B. | Bigger than others |
C. | Lower than others |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
125. |
What are the design requirements for building a container from the scratch? |
A. | Allocator interface requirements |
B. | Iterator requirements |
C. | Container interface requirements |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
126. |
What kind of library is Standard Template Library? |
A. | Inheritable |
B. | Polymorphic |
C. | Generic |
D. | Both Polymorphic & Generic |
E. | None of these |
Answer» E. None of these | |
127. |
What do maps and sets support? |
A. | No any directional iterators |
B. | Single directional iterators |
C. | Bi-directional iterators |
D. | Single directional & Bi-directional iterators |
E. | None of these |
Answer» D. Single directional & Bi-directional iterators | |
128. |
How many instance are allowed by map and set while inserting a element into container? |
A. | Multiple |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» E. None of these | |
129. |
By using which of the following the elements in the associate container can be efficiently accessed? |
A. | Array |
B. | Key |
C. | Position |
D. | Both Key & Position |
E. | None of these |
Answer» C. Position | |
130. |
What do associate containers implement? |
A. | Associative arrays |
B. | Functional Arrays |
C. | Arrays |
D. | All of above |
E. | None of these |
Answer» B. Functional Arrays | |
131. |
Which operator is used in priority queue? |
A. | operator> |
B. | operator) |
C. | operator< |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
132. |
In which context does the stack operates? |
A. | Random |
B. | FIFO |
C. | LIFO |
D. | Both FIFO & LIFO |
E. | None of these |
Answer» D. Both FIFO & LIFO | |
133. |
Which of the following does not support any insertion or deletion? |
A. | List |
B. | Dequeue |
C. | Array |
D. | Vector |
E. | None of these |
Answer» D. Vector | |
134. |
How the list containers are implemented? |
A. | Using Single linked list |
B. | Using Double linked list |
C. | Using Single & Double linked list |
D. | All of above |
E. | None of these |
Answer» C. Using Single & Double linked list | |
135. |
Which of the following will return the new element at the end of container? |
A. | pop_back |
B. | push_back |
C. | front |
D. | back |
E. | None of these |
Answer» E. None of these | |
136. |
Which of the following class template are based on arrays? |
A. | dequeue |
B. | vector |
C. | both dequeue & vector |
D. | list |
E. | None of these |
Answer» D. list | |
137. |
How many items are there in sequence container? |
A. | 5 |
B. | 4 |
C. | 3 |
D. | 2 |
E. | None of these |
Answer» B. 4 | |
138. |
Which is optional in the declaration of vector? |
A. | Number_of_elements |
B. | Vector |
C. | Name |
D. | Type |
E. | None of these |
Answer» B. Vector | |
139. |
Pick out the correct statement about vector. |
A. | vector values (10) |
B. | vector<int> (10) |
C. | vector<int> values (10) |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
140. |
Which are the parameters for the content of the buffer? |
A. | new |
B. | start |
C. | finish |
D. | both start & finish |
E. | None of these |
Answer» E. None of these | |
141. |
Which of the following type does the container should define? |
A. | Vector type |
B. | Storage type |
C. | Iterator type |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
142. |
How many sets of requirements are need in designing a container? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» C. 2 | |
143. |
What is meant by type_info? |
A. | Used to hold the type information returned by the dynamic_cast |
B. | Used to hold the type information returned by the static_cast |
C. | Used to hold the type information returned by the typeid operator |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
144. |
Which is used to solve the memory management problem in c++? |
A. | arrays |
B. | stack |
C. | smart pointers |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
145. |
What is meant by garbage collection? |
A. | Used to replace the variables |
B. | The form of manual memory management |
C. | The form of automatic memory management |
D. | All of above |
E. | None of these |
Answer» D. All of above | |
146. |
What can go wrong in resource management on c++? |
A. | Exhaustion |
B. | Dangling |
C. | Leakage |
D. | All of above |
E. | None of these |
Answer» E. None of these | |
147. |
How many types of models are available to create the user-defined data type? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» D. 1 | |
148. |
What is the scope of typedef defined data types? |
A. | outside the program |
B. | inside that block only |
C. | whole program |
D. | All of above |
E. | None of these |
Answer» B. inside that block only | |
149. |
How many types of user-defined data type are in c++? |
A. | 4 |
B. | 3 |
C. | 2 |
D. | 1 |
E. | None of these |
Answer» C. 2 | |
150. |
Which keyword is used to define the user defined data types? |
A. | union |
B. | def |
C. | type |
D. | typedef |
E. | None of these |
Answer» E. None of these | |