Question: Consider the incomplete code. The purpose of the code is to generate a queue MYQ : #include #include int main ( ) { std::queue myQ;

Consider the incomplete code.
The purpose of the code is to generate a queue MYQ :
#include #include int main()
{ std::queue myQ;
//...(I) CODE SHOULD GO HERE ...
return 0;}
Which of the following code (i) will correctly add elements "blue", "red" and "green" to the back of the queue?
a. myQ.push("blue");
myQ.push("red");
myQ.push("green");
b. myQ.push("blue","red","green");
c. myQ.add("green");
myQ.add("red");
myQ.add("blue");
d. myQ.add("green","red","blue);
e. None of the options provided.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!