1.

What is the output of this program?
 #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
int num[] = {6, 7, 8, 9 ,10};
vector<int> VectorData(num, num + 5);
VectorData.push_back(100);
push_heap (VectorData.begin(),VectorData.end());
cout << VectorData.front() << ' n';
sort_heap (VectorData.begin(),VectorData.end());
return 0;
}

A. 6, 7, 8, 9 ,10
B. 6, 7, 8, 9
C. 100
D. 6, 7, 8
E. 6, 7
Answer» D. 6, 7, 8


Discussion

No Comment Found

Related MCQs