CJCoding With Joseph
15per day
← Back to Question List

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics:
C++ Quiz #3

Vector Size

easyArrays

What is the output of this code?

📄 Code

1#include <iostream>
2#include <vector>
3using namespace std;
4 
5int main() {
6 vector<int> v = {1, 2, 3};
7 v.push_back(4);
8 v.push_back(5);
9 cout << v.size() << endl;
10 return 0;
11}