-
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;
}
-
- 6, 7, 8, 9 ,10
- 6, 7, 8, 9
- 100
- 6, 7, 8
- 6, 7
Correct Option: C
In this program, We are pushing a new value into heap and printing it.