Beginner C++
Q34 / 100

What is the range-based for loop syntax in C++11?

Correct! Well done.

Incorrect.

The correct answer is B) for (auto x : collection)

B

Correct Answer

for (auto x : collection)

Explanation

The range-based for (for (auto x : v)) iterates over all elements, using begin() and end() iterators internally.

Progress
34/100