Introduction to iterators
On this page
Motivation
Iterators
Basic overview of the STL
Questions
Q1
QIterators, Q1
This question is ungraded.
We can view a container as a sequence of elements; the sequence's end is conventionally defined as:
Q2
QIterators, Q2
This question is ungraded.
In the standard template library model, algorithms and containers interact through which data structure? Select the best response.
Q3
QIterators, Q3
This question is ungraded.
In the standard template library model,
manipulate data, but don’t know about containers.
Select the best response that fills in the blank.
Q4
QIterators, Q4
This question is ungraded.
In the standard template library model,
store data, but do not know about algorithms.
Q5
QIterators, Q5
This question is ungraded.
In the standard template library model, a pair of
defines a sequence and allow us to iterate through different types of containers the same way.
Q6
QIterators, Q6
This question is ungraded.
Most iterator types provide three common behaviors. Which iterator operation allows access to the element we're currently visiting?
Q7
QIterators, Q7
This question is ungraded.
Most iterator types provide three common behaviors. Which iterator operation moves an iterator to the next element in the sequence?
Q8
QIterators, Q8
This question is ungraded.
Most iterator types provide three common behaviors. Which iterator operation is used to check whether two iterators are at the same element?
Q9
QIterators, Q9
This question is ungraded.
An iterator is an abstraction of a(n)
.
Select the best response that fills in the blank.
Q10
QIterators, Q10
This question is ungraded.
true, or false: no iterator type supports any
operation(s) other than those listed below.
- access to the element we're currently visiting,
- move to the next element in the sequence, and
- check whether two iterators are visiting the same element