Q.

At this point, ‘*’ is encountered. What has to be done?

A. 5*4=20 is pushed into the stack
B. * is pushed into the stack
C. 2*3=6 is pushed into the stack
D. * is ignored
Answer» A. 5*4=20 is pushed into the stack
Explanation: when an operator is encountered, the first two operands of the stack are popped, evaluated and the result is pushed into the stack.
579
0
Do you find this helpful?
7

Discussion

No comments yet