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

Discussion

The equivalent postfix express for d / (e + f) + b * c is :

  • A.defbc / ++
  • B.def + / bc + *
  • C.def + / bc * +
  • D.def / ++ bc *

Answer: C

The postfix form is def + / bc * +.

Convert by precedence: the parenthesised e + f becomes ef+; dividing d by it gives def+/; b * c becomes bc*; finally the two parts are added.

\[ d / (e + f) + b * c \;\to\; d\,e\,f + /\ b\,c * + \]

Option B, def+/bc+*, evaluates to (d / (e + f)) * (b + c): it adds b and c and then multiplies, the reverse of the given expression. Options A and D are not valid for this expression at all; in A the division is applied to b and c, and D runs out of operands for its second +.

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

Post your comment

Please log in or register to post a comment.