+ 2

What output??

#include <iostream> #include <algorithm> #include <vector> using namespace std; int main () { int myints[] = {10, 20, 30, 5, 15}; vector<int> v(myints, myints + 5); make_heap (v.begin(), v.end()); pop_heap (v.begin(), v.end()); v.pop_back(); cout << v.front() << '\n'; return 0; }

10th Apr 2020, 4:45 PM
ekhlas Mohamed Abdallah Mohamed
ekhlas Mohamed Abdallah Mohamed - avatar
4 Respostas
+ 2
There's is a c++ code playground in sololearn, why don't you try?
10th Apr 2020, 6:56 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 2
I kown that, I need to run yourl mine as the compiler to guess what output
10th Apr 2020, 8:21 PM
ekhlas Mohamed Abdallah Mohamed
ekhlas Mohamed Abdallah Mohamed - avatar
+ 2
20 is the output .
12th Apr 2020, 12:45 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
ekhlas Mohamed Abdallah Mohamed Same code same output everywhere
11th Apr 2020, 2:45 AM
Sudarshan Rai
Sudarshan Rai - avatar