Question
#include <iostream>
#include <set>
using namespace std;
int main ()
{
multiset<int> mymultiset;
for (int i = 0; i < 5; i++) mymultiset.insert(i);
multiset<int> :: key_compare mycomp = mymultiset.key_comp();
int highest = *mymultiset.rbegin();
multiset<int> :: iterator it = mymultiset.begin();
do
{
cout << ' ' << *it;
} while (mycomp(*it++, highest));
return 0;
}
a.
12345
b.
01234
c.
1234
d.
0123
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. How many instance are allowed by map and set while inserting a element into container?
View solution
Q. What do maps and sets support?
View solution
Q. What kind of library is Standard Template Library?
View solution
Q. To what type of object does the container can be instantiated?
View solution
Q. What type of class template is list?
View solution
Q. What type of access does deque and vector provide?
View solution
Q. Where does the vector add the item?
View solution
Q. Which are not full container classes in c++?
View solution
Q. What is the lifetime of the element in container?
View solution
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
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!