Skip to main contentSkip to solution

What will be the output of the following postfix notation:

2 3 * 12 2 6 * / -

Solution

✅ Correct Option: 2

In postfix, each operator acts on the two values just before it, with the earlier value on the left.

2 3 ∗  →  2×3=62\ 3\ * \;\to\; 2 \times 3 = 6

2 6 ∗  →  2×6=122\ 6\ * \;\to\; 2 \times 6 = 12

12 12 /  →  12÷12=112\ 12\ / \;\to\; 12 \div 12 = 1

6 1 −  →  6−1=56\ 1\ - \;\to\; 6 - 1 = \boxed{5}

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question