Solved

What Is the Output of the Following Code? QueueType<int> Queue;

Question 23

Multiple Choice

What is the output of the following code? queueType<int> queue;
Int x,y;
x = 2;
y = 3;
queue.addQueue(x) ;
queue.addQueue(y) ;
x = queue.front() ;
queue.deleteQueue() ;
queue.addQueue(x + 2) ;
queue.addQueue(x) ;
queue.addQueue(y - 3) ;
y = queue.front() ;
queue.deleteQueue() ;
cout << "x = " << x << endl;
cout << "y = " << y << endl;


A) x = 2
y = 4
B) x = 4
y = 3
C) x = 2
y = 3
D) x = 3
y = 2

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions