The result evaluating the postfix expression 10 5 + 60 6 / * 8 − is

20152024

The result evaluating the postfix expression 10 5 + 60 6 / * 8 − is

  1. A.

    284    

  2. B.

    213

  3. C.

    142

  4. D.

    71

Attempted by 586 students.

Show answer & explanation

Correct answer: C

Key insight: evaluate the postfix expression left to right using a stack. Apply each operator to the two most recent operands.

  1. 10 5 + → 15 (push 10, push 5, then add)

  2. 60 6 / → 10 (push 60, push 6, then divide 60 by 6)

  3. 15 10 * → 150 (multiply the results 15 and 10)

  4. 150 8 − → 142 (subtract 8 from 150)

Answer: 142

Explore the full course: Gate Guidance By Sanchit Sir