ExamVeda
Login
Home
C 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;
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.