67 224
Assignments Done
99,2%
Successfully Done
In November 2018

Answer to Question #23768 in C++ for lovish maini

Question #23768
WAF to show the enqueue operation in queue.
Expert's answer
#include <queue>
#include <conio.h>
#include <iostream>

using namespace std;

void main()
{
queue<int> q;

/* Add elements to the queue (enqueue) */
q.push(6);
q.push(10);
q.push(4);
q.push(17);
q.push(9);

/* Dequeue all elements displaying them on a screen */
while (!q.empty())
{
cout << "& " << q.front();
q.pop();
}
_getch();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions