The prefix expression of the postfix expression AB+CD-* is __________

Stasenndb

New member
The prefix expression of the postfix expression AB+CD-* is __________
A. (A+B)*(C-D)
B. +AB*-CD
C. A+*BCD-
D. *+AB-CD
 
Answer: d
Explanation: To convert from postfix to prefix, we first convert it to infix and then to prefix.
postfix : AB+CD-*
infix ⇒ (A+B) * (C-D)
So, prefix ⇒ +AB*-CD,
⇒ *+AB-CD.
Therefore, correct choice is *+AB-CD.
 

Tìm kiếm

Back
Top