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
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.