← Quiz: Iterators in C++: all 10 questions
Quiz: Iterators in C++ · Question 1 of 10
What does v.end() point to?
What does v.end() point to?
- A.The last element of v
- B.One position past the last element; it must not be dereferenced
- C.The first element of v
- D.nullptr
Answer & explanation
Correct answer: One position past the last element; it must not be dereferenced
end() is a stop marker for the half-open range [begin, end).
Can you get the rest right without peeking?
Take the timed Quiz: Iterators in C++ quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →