Assertion (A): Quadruples are preferred to triples when the intermediate code will be optimised.
Reason (R): A triple names its result by its own position, so moving an instruction invalidates every reference to it.
Answer: C
Correct answer: Both A and R are true, and R is the correct explanation of A
Both are true and the reason gives the mechanism. Optimisation moves and removes instructions constantly, and in a triple representation an instruction’s identity is its position, so every such change invalidates the references to it. A quadruple names its result explicitly and is unaffected.
Please log in or register to report this question.