1.

What is the output of this program?
#include <iostream>
#include <set>
using namespace std;
int main ()
{
set<int> SetData;
SetData.insert(25);
SetData.insert(15);
SetData.insert(45);
SetData.insert(35);
SetData.insert(55);
while (!SetData.empty())
{
cout << ' ' << *SetData.begin();
SetData.erase(SetData.begin());
}
return 0;
}

A. 15
B. 15 25
C. 15 25 35
D. 15 25 35 45
E. 15 25 35 45 55
Answer» F.


Discussion

No Comment Found

Related MCQs