Vidyalelo
C++ Programming · Q444

C++ miscellaneous

Programming · C++ Programming · question 444

Q444

What will be the output of the following C++ code? #include #include using namespace std; int main () try map mymap; map :: iterator it; mymap['a'] = 50; mymap['b'] = 100; mymap['c'] = 150; mymap['d'] = 200; it = mymap.find('b'); mymap.erase (it); mymap.erase (mymap.find('d')); cout second << ' '; catch (...) cout << "Unknown exception: " << endl; return 0;

A.
50
Answer
B.
100
C.
150
D.
Exception

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board