-
What is the output of this program?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
int num[] = {3, 5, 7, 9, 11};
vector<int> VectorData(num, num + 6);
make_heap (VectorData.begin(),VectorData.end());
cout << VectorData.front() << '\n';
return 0;
}
-
- 11
- 3
- 5
- 7
- 9
Correct Option: A
In this program, We are printing the maximum value in the heap.