Home / MCQ Bank / Computer
Computer Plus Plus Miscellaneous Difficulty: Medium

What will be the output of the following C++ code? #include <iostream> #include <map> using namespace std; int main () { multimap<char, int> mymultimap; mymultimap.insert(make_pair('x', 100)); mymultimap.insert(make_pair('y', 200)); mymultimap.insert(make_pair('y', 350)); mymultimap.insert(make_pair('z', 500)); cout << mymultimap.size() << '\n'; return 0; }

Select the correct option to test your answer:

More Computer Questions

Error control is needed at the transport layer because of potential errors occurring _____. Accessibility modifiers defined in a class are? Which of the following is primary tool for debugging? Which of the following is an invalid method for input? What will be the output of the following C++ code? #include <iostream> #include <string> #include <tuple> using namespace std; int main() { tuple <int, string> tp1; tuple <int, string> tp2; tp1 = make_tuple(0, "Hello"); tp2 = make_tuple(1, "World"); auto tp3 = tuple_cat(tp1, tp2); cout<<"("<<get<0>(tp3)<<", "<<get<1>(tp3)<<", "<<get<2>(tp3)<<", "<<get<3>(tp3)<<")"<<endl; return 0; }