Question PRG-CPP-0031
EasyWhat is the output of this program?
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
vector<int> v = {4, 2, 9};
sort(v.begin(), v.end());
cout << v[0];
return 0;
}
- A.
9
- B.
0
- C.
2
- D.
4
Sign up free to see the answer and a step-by-step explanation.