-
What is the output of this program?
#include <iostream>
#include <queue>
using namespace std;
int main ()
{
priority_queue<int> QueueData;
QueueData.push(12);
QueueData.push(25);
QueueData.push(13);
cout << QueueData.top() << endl;
return 0;
}
-
- 12
- 25
- 13
- All of above
- None of these
Correct Option: B
In this program, We used the queue template and the top method is used to retain the last but before element.