Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

what is the output of the folowing code? #include <iostream> #include <queue> us

ID: 3603967 • Letter: W

Question

what is the output of the folowing code?

#include <iostream>
#include <queue>
using namespace std;

int main()
{
queue<string> books;
books.push("To kill a mockingbird");
books.push ("The great gatsby");
books.push ("THe odyssey");
books.push ("Moby Dick");
  
cout << "There are " << books.size () << "books in your wish list.";
  
cout << "The first book on the list is: "<< books.top() << endl;
  
cout << "I will remove it "<< endl;
  
books.pop();
  
cout << "The first book on the list now is: "<< books.top () <<endl;
  
  
}

Explanation / Answer

There are 4books in your wish list.The first book on the list is: To kill a mockingbird

I will remove it

The first book on the list now is: The great gatsby