Machine-translated by Google. Questions are authored in English.
Top

Discussion

The postfix form of A*B+C/D is :

  • A.* A B / C D +
  • B.A B * C D / +
  • C.A * B C + / D
  • D.A B C D + / *

Answer: B

The postfix form is A B * C D / +.

Multiplication and division bind more tightly than addition, so the expression is (A*B) + (C/D). Converting each part to postfix puts the operator after its operands:

\[ \begin{aligned} A*B &\rightarrow A\ B\ * \\ C/D &\rightarrow C\ D\ / \\ (A*B)+(C/D) &\rightarrow A\ B\ *\ C\ D\ /\ + \end{aligned} \]

Option A puts the operators first, which is closer to prefix form. Options C and D change the grouping, applying + before * and /, which is not what the expression means.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.