Home / MCQ Bank / Computer
Computer Plus Plus Miscellaneous

What will be the output of the following C++ code? #include <iostream> #include <map> using namespace std; int main () { map<char, int> mymap; map<char, int> :: iterator it; mymap['b'] = 100; mymap['a'] = 200; mymap['c'] = 300; for (map<char, int> :: iterator it = mymap.begin(); it != mymap.end(); ++it) cout << it -> first << " => " << it -> second << '\n'; return 0; }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • a => 200 b => 100 c => 300

Related Computer Questions

What is the purpose of the `FocusEvent` class in Java event handling? The ______ operating system was initially created in the early 1970s at AT & T Bell Labs. The ribbon in Word 2007 consists of a series of___________? Which section is used for text and tags that are shown directly on your web page ? Which shortcut command is used to open the find Barto search the current page in Google Chrome?