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

Discussion

Translating a boolean expression by the jumping method uses

  • A.synthesised attributes carrying the value upward
  • B.no attributes at all
  • C.inherited attributes naming the true and false destinations
  • D.one temporary holding whatever the expression evaluates to

Answer: C

Correct answer: inherited attributes naming the true and false destinations

The jumping translation never computes a boolean value at all: it passes down, as inherited attributes, the labels to jump to if the expression proves true and if it proves false. Each subexpression generates jumps to those, which is what gives the short-circuit evaluation of and and or for nothing.

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

Post your comment

Please log in or register to post a comment.