The postfix expression equivalent to the prefix expression * + a b - c d is
2023
The postfix expression equivalent to the prefix expression * + a b - c d is
- A.
a b + c d - *
- B.
a b c d + - *
- C.
a b + c d * -
- D.
More than one of the above
- E.
None of the above
Attempted by 575 students.
Show answer & explanation
Correct answer: A
Given prefix expression: * + a b - c d
The outermost operator is *, so the expression is:
(+ a b) * (- c d)
Convert each part to postfix:
+ a b -> a b +
- c d -> c d -
Now place * after the two postfix parts:
a b + c d - *
Therefore, option A is correct.