Skip to main contentSkip to solution

What is the postfix expression of the given infix expression?

(A + B) * (C - D)

Solution

✅ Correct Option: 1

Brackets are converted first, since they have the highest priority. In postfix, each operator is written after its two operands.

(A+B)→A B +(A + B) \rightarrow A\ B\ +

(C−D)→C D −(C - D) \rightarrow C\ D\ -

The ∗* then joins the two results, so it goes after both: A B + C D − ∗A\ B\ +\ C\ D\ -\ *

Operands keep their original left-to-right order in postfix. Only the operators move.

Keyboard Shortcuts

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