Q. 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
πŸ’¬ Discuss
βœ… Correct Answer: (B) pop 2 operands, evaluate them and push the result on to the stack
Explanation: when an operator is encountered, the first two operands are popped from the stack, they are evaluated and the result is pushed into the stack.

Explanation by: Mr. Dubey
when an operator is encountered, the first two operands are popped from the stack, they are evaluated and the result is pushed into the stack.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
952
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
80%
Success Rate