Question
#include <iostream>
#include <map>
using namespace std;
int main ()
{
multimap<char, int> mymultimap;
mymultimap.insert(make_pair('y', 202));
mymultimap.insert(make_pair('y', 252));
pair<char, int> highest = *mymultimap.rbegin();
multimap<char, int> :: iterator it = mymultimap.begin();
do
{
cout << (*it).first << " => " << (*it).second << '\n';
} while ( mymultimap.value_comp()(*it++, highest) );
return 0;
}
a.
y => 202
b.
y => 252
c.
y => 202 & y => 252
d.
None of the mentioned
Posted under Object Oriented Programming Using C++
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. What do all STL containers define?
View solution
Q. What do we return if we use simple array on a internal container?
View solution
Q. What is mandatory for designing a new container?
View solution
Q. What are the design requirements for building a container from the sratch?
View solution
Q. How many iterators are needed for the defining a new container?
View solution
Q. What is the use of the allocater interface in the user-defined container?
View solution
Q. How many types of container classes are there in c++?
View solution
Q. What is the name of the container which contains group of multiple objects?
View solution
Q. The ANSI/ISO standard offers how many header files?
View solution
Q. The list and vector classes is defined in
View solution
Q. Integer ASCII code has a range of
View solution
Q. Why the #define directive is used?
View solution
Q. A stream that exists only during the execution of program in which it is defined?
View solution
Q. Which from the following function is defined in library?
View solution
Q. A stream header has
View solution
Q. How many header files are supported by Standard template library?
View solution
Q. How many C++ standard header files are named without the traditional .h suffix?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!