What are the value of X and Y? There are two important operations on - ProProfs Discuss
Topics
Products
Follow Us:

What are the value of X and Y? There are two important operations on a stack: PUSH and POP. PUSH adds the new data to the top of the stack leaving previous data below, and POP removes and returns the current top data of the stack. When the operations shown below are sequentially executed, which of the following is the correct combination of the values x and y?Here, the size of the stack is big enough to hold the entire data. “PUSH(a)” inserts the data a into the stack, and “POP(b)” removes the data b from the stack.[OperationPUSH (5);PUSH (3);PUSH (6);PUSH (1);x = POP (  );PUSH (7);y = POP (  );




This question is part of DSA_4
Asked by Lethao.c, Last updated: Jun 13, 2020

+ Answer
Request

1 Answer

lethao.c

Lethao.c

Answered Nov 15, 2018

Answer b)
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.