adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    #include <algorithm>
    #include <vector>
    using namespace std; 
    int main ()
    {
        int myints[] = {2, 4, 6, 8, 10};
        vector<int> v(myints, myints + 5);
        make_heap (v.begin(),v.end());
        cout  << v.front() << '\n'; 
        return 0;
    }

a.

10

b.

20

c.

4

d.

8

Answer: (a).10

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?