Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
#include
3.
#include
4.
using namespace std;
5.
int main()
6.
{
7.
queue q;
8.
q.push('a');
9.
q.push('b');
10.
q.push('c');
11.
cout
Options:
A .  ab
B .  abc
C .  a
D .  Error
Answer: Option B

In this program, We used the queue to process the given input.
Output:
$ g++ std1.cpp
$ a.out
abc



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers