Answer (A) 6,1
Explanation.
(823) operation 2^3 is done and pushed in to the stack. Stack is (8,8)
Operation is / ,calculation 8/8 =1 and pushed in to the stack and stack is(1).push 2,3. stack is(1,2,3)
Operation is *. Multiplication is done 2*3 and pushed inside the stack. Stack contents are (1,6).
So the top two elements of stack are 6,1 as by popping the contents of the stack.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.