Vidyalelo
C++ Programming · Q893

C++ miscellaneous

Programming · C++ Programming · question 893

Q893

What will be the output of the following C++ code? #include #include using namespace std; int main () multiset mymultiset; for (int i = 0; i :: key_compare mycomp = mymultiset.key_comp(); int highest = *mymultiset.rbegin(); multiset :: iterator it = mymultiset.begin(); do cout << ' ' << *it; while (mycomp(*it++, highest)); return 0;

A.
12345
B.
01234
Answer
C.
1234
D.
0123

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board