1.

What is the output of this program?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
int Numbers[] = {100, 200, 300, 50, 150};
vector<int> Data(Numbers, Numbers + 5);
make_heap (Data.begin(), Data.end());
pop_heap (Data.begin(), Data.end());
Data.pop_back();
cout << Data.front();
return 0;
}

A. 100
B. 200
C. 300
D. 50
E. 150
Answer» C. 300


Discussion

No Comment Found

Related MCQs