1.

What is the output of this program?
#include &ltiostream>
#include <set>
using namespace std;
int main()
{
set<int> DataSet;
DataSet.insert(25);
DataSet.insert(20);
DataSet.insert(30);
DataSet.insert(35);
DataSet.insert(18);
set<int> :: const_iterator p;
for(p = DataSet.begin(); p != DataSet.end(); ++p)
cout << *p << ' ';
return 0;
}

A. 18
B. 18 20
C. 18 20 25
D. 18 20 25 30
E. 18 20 25 30 35
Answer» F.


Discussion

No Comment Found

Related MCQs