Home » C++ Programming » Standard Library » Question
  1. What is the output of this program?
    #include <iostream>
    #include <list>
    #include <queue>
    using namespace std;
    int main()
    {
    queue<char> que;
    que.push('I');
    que.push('L');
    que.push('U');
    cout << que.front() << " ";
    que.pop();
    cout << que.front() << " ";
    que.pop();
    cout << que.front();
    que.pop();
    }
    1. L U I
    2. I U L
    3. L I U
    4. I L U
    5. None of these
Correct Option: D

In this program, We used the queue to process the given input.



Your comments will be displayed only after manual approval.