A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. Consider the grammar rule E → E1 - E2 for arithmetic expressions. The code generated is targeted to a CPU having a single user register. The subtraction operation requires the first operand to be in the register. If E1 and E2 do not have any common sub expression, in order to get the shortest possible code
a. E1 should be evaluated first
b. E2 should be evaluated first
c. Evaluation of E1 and E2 should necessarily be interleaved
d. Order of evaluation of E1 and E2 is of no consequence
Answer:E2 should be evaluated first
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: