

MCQOPTIONS
Saved Bookmarks
This section includes 8 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 are Random-access Iterators? |
A. | Iterators that can be used to access elements at an arbitrary offset position |
B. | Same as Bi-directional iterator |
C. | Input iterator with the additional property of random access |
D. | Output iterator with the additional property of random access |
Answer» B. Same as Bi-directional iterator | |
2. |
What are Bi-directional iterators? |
A. | Iterator same as Forward Iterator |
B. | Forward Iterator that can be used in both directions |
C. | Iterator that can only be used to access the sequence from both sides |
D. | Iterator that can only be used to assign the sequence from both sides |
Answer» C. Iterator that can only be used to access the sequence from both sides | |
3. |
Which of the following is an advantage of Forward iterator over input and output iterator? |
A. | Can be used as both accessing and assigning iterator |
B. | Forward iterator can be incremented or decremented |
C. | Can be used with relational operators also |
D. | Can be used with arithmetic operators also |
Answer» B. Forward iterator can be incremented or decremented | |
4. |
Which of the following is correct about Input Iterators? |
A. | Input iterators can be used with all relational operators |
B. | Input iterators can work with arithmetic operators |
C. | No value can be assigned to the location pointed by Input Iterator |
D. | Input iterators can work with sequence operators |
Answer» D. Input iterators can work with sequence operators | |
5. |
Pick the correct statement. |
A. | Input iterator moves sequentially forward |
B. | Input iterator moves sequentially backward |
C. | Input iterator moves in both direction |
D. | Input iterator moves sequentially downwards |
Answer» B. Input iterator moves sequentially backward | |
6. |
How many types of Iterators are there? |
A. | 5 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» B. 2 | |
7. |
Which function is used increment the iterator by a particular value? |
A. | next() |
B. | advance() |
C. | prev() |
D. | move() |
Answer» C. prev() | |
8. |
What are Iterators? |
A. | STL component used to point a memory address of a container |
B. | STL component used for vectors |
C. | STL component used to call functions efficiently |
D. | STL component used to define template classes |
Answer» B. STL component used for vectors | |