Skip to main contentSkip to solution

The infix expression (a -b) / (c+d) converted to POSTFIX is :

Solution

✅ Correct Option: 2

The brackets force (a - b) and (c + d) to be evaluated first, and the division is done last. Each bracket converts on its own: (a−b)→ab−(a - b) \rightarrow ab- and (c+d)→cd+(c + d) \rightarrow cd+.

The operator / then goes after both operands, which gives ab−  cd+  /ab-\;cd+\;/.


Option 1: here / is applied to c and d, and + is applied last, which changes the order of operations.

Option 3: the operands a, b, c, d are written together, so - would act on c and d instead of a and b.

Option 4: it gives a - ((b) ... ) style grouping with / acting on c and d, which ignores the brackets.

In postfix, the operator always comes right after its two operands, and brackets are never needed.

Keyboard Shortcuts

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