LogiQuest
Back to STL
1

What will be the output of the program?

#include <iostream>
using namespace std;
#include <vector>
int main() {
    vector<int> v = {3, 1, 4};
    v.push_back(1);
    cout << v.size() << " " << v[2] << endl;
    return 0;
}
Easy

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.