LogiQuest
Back to STL
10

What will be the output of the program?

#include <iostream>
using namespace std;
#include <vector>
int main() {
    vector<int> v = {1, 2, 3};
    v.pop_back();
    v.insert(v.begin(), 9);
    for (int x : v) cout << x;
    cout << endl;
    return 0;
}
Medium

Discussion (0)

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

Log in to join the discussion.