Skip to content
Quiz · Containers and Iterators · lesson 2 of 11

Quiz — size and capacity

What do the vectors a and b hold after reserve(5) and resize(5)?

C++
#include <vector>

int main() {
    std::vector<int> a;
    a.reserve(5);
    std::vector<int> b;
    b.resize(5);
}