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

Discussion

Assertion (A): Debugging optimised code is notoriously difficult.
Reason (R): Optimisation reorders and eliminates computations so the machine state no longer corresponds simply to any point in the source.

  • A.Both A and R are true, and R is the correct explanation of A
  • B.Both A and R are true, but R is not the correct explanation of A
  • C.A is true but R is false
  • D.A is false but R is true

Answer: A

Both are true and the reason gives the mechanism, and this is why builds are often produced twice. A variable may be held in a register at one moment and nowhere at all the next, so the debugger cannot always report its value.

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

Post your comment

Please log in or register to post a comment.