Question PRG-CPP-0063
HardWhat is the output of this program?
#include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
map<int, string> m{{3, "c"}, {1, "a"}, {2, "b"}};
auto it = m.lower_bound(2);
cout << it->second << m.begin()->first << prev(m.end())->second;
return 0;
}
- A.
c1b
- B.
a1c
- C.
Sign up free to see the answer and a step-by-step explanation.