Vidyalelo
C++ Programming · Q528

C++ miscellaneous

Programming · C++ Programming · question 528

Q528

What will be the output of the following C++ code? #include #include #include using namespace std; int main () int myints[] = 10, 20, 30, 5, 15; vector v(myints, myints + 5); make_heap (v.begin(), v.end()); pop_heap (v.begin(), v.end()); v.pop_back(); cout << v.front() << ' '; return 0;

A.
10
B.
20
Answer
C.
30
D.
5

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board