Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

Which STL container should be the default choice for a sequence of elements?

  1. A std::list
  2. B std::vector
  3. C std::deque
  4. D std::forward_list
Answer

std::vector

Contiguous storage makes vector cache-friendly, which usually beats better asymptotic complexity at realistic sizes.

All C++ MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as