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

Discussion

Translating a boolean expression by the value method produces code that

  • A.requires the expression to contain only a single operator
  • B.computes true or false into a temporary like any other value
  • C.jumps directly to the destination without computing anything
  • D.cannot be used in a conditional statement at all

Answer: B

The value approach is needed when the result is stored or passed. It is less efficient than jumping code inside a condition, where the value is tested and immediately discarded. Compilers choose between the two according to how the result is used.

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

Post your comment

Please log in or register to post a comment.