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

Discussion

Induction variable elimination applies to a variable that

  • A.is never modified anywhere within the body of the loop
  • B.holds the result of the loop after it has terminated
  • C.changes by a fixed amount on each iteration of a loop
  • D.is assigned a constant value before the loop begins

Answer: C

A basic induction variable advances by a constant step. Derived induction variables computed from it can often be updated incrementally, or eliminated in favour of one another. Address computations inside array loops are the classic example.

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

Post your comment

Please log in or register to post a comment.