
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:
Verified
Q21: A technique in which one system models
Q23: Which of the following is a basic
Q24: The expression (a - b)* (c +
Q25: What is the output of the following
Q30: To describe a queuing system,we use the
Q31: In the linked implementation of stacks,the stack
Q32: In evaluating a postfix expression, when an
Q37: The postfix expression 3 5 + 2
Q39: The postfix expression 14 2 5 +
Q40: To describe a queuing system, we use
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents