Practice mode C++

Which C++ Standard Library container works as a dynamic array that can grow in size?

Correct answer B. vector

Explanation

std::vector stores elements contiguously like an array but resizes itself automatically, for example when push_back() adds a new element at the end.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.