• Tutorials
  • Courses
  • Tracks

queue stl Question 9

Last Updated :
Discuss
Comments

What will be the output of the following C++ code?

#include <iostream>
#include <queue>
using namespace std;
int main()
{
queue<int> myqueue;
myqueue.push(30);
myqueue.push(40);
myqueue.push(10);
myqueue.push(50);

cout << myqueue.back();
return 0;
}

30

40

10

50

Share your thoughts in the comments