While evaluating a postfix expression, when an operator is encountered, what is the correct operation to be performed?

Q & ACategory: Data StructureWhile evaluating a postfix expression, when an operator is encountered, what is the correct operation to be performed?
Admin Staff asked 4 years ago

While evaluating a postfix expression, when an operator is encountered, what is the correct operation to be performed?
a) push it directly on to the stack
b) pop 2 operands, evaluate them and push the result on to the stack
c) pop the entire stack
d) ignore the operator

1 Answers
Admin Staff answered 4 years ago

b) pop 2 operands, evaluate them and push the result on to the stack