Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyC++vector basicsSingle-choice MCQ

After this code runs, what does std::cout << v.size() << " " << v.capacity(); guarantee about the printed values?

std::vector<int> v{1, 2, 3, 4, 5}; v.clear();