What are the value of X and Y? There are two important operations on - ProProfs Discuss
Advertisement

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 (  );




Asked by Lethao.c, Last updated: Apr 06, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

lethao.2c08

lethao.c

lethao.2c08
Lethao.c

Answered Nov 15, 2018

Answer b)
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

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