What is the output of the following code?
?
queueType queue;
int x, y;
?
x = 2;
y = 6;
queue.addQueue(x);
queue.addQueue(y);
x = queue.front();
queue.deleteQueue();
queue.addQueue(x + 2);
queue.addQueue(x);
queue.addQueue(y - 3);
?
while (!queue.isEmptyQueue())
{
cout << queue.front() << " ";
queue.deleteQueue();
}
cout << endl
?
int x, y;
?
x = 2;
y = 6;
queue.addQueue(x);
queue.addQueue(y);
x = queue.front();
queue.deleteQueue();
queue.addQueue(x + 2);
queue.addQueue(x);
queue.addQueue(y - 3);
?
while (!queue.isEmptyQueue())
{
cout << queue.front() << " ";
queue.deleteQueue();
}
cout << endl
?
A. 6 2 3 3
B. 6 2 4 2
C. 6 3 3 3
D. 6 4 2 3
Answer: D
Computer Science & Information Technology
You might also like to view...
On a chart, ________ can be used to point out items that need more explanation
A) callouts B) values C) a legend D) perspective
Computer Science & Information Technology
A(n) ____ is a clickable area on an image that, when clicked, links the user to a different location on the page or to another web page.
A. image map B. linked anchor C. hotspot D. named anchor
Computer Science & Information Technology