Question PRG-CPP-0073
HardWhat is the output of this program?
#include <iostream>
#include <set>
#include <iterator>
using namespace std;
int main() {
set<int> s{5, 1, 9, 3};
auto it = s.upper_bound(3);
cout << *it << " " << distance(s.begin(), it) << " " << s.count(4);
return 0;
}
- A.
3 1 0
- B.
5 3 0
- C.
Sign up free to see the answer and a step-by-step explanation.