Gate CS-2011 Question Paper With Solutions

Q. 36 Consider evaluating the following expression tree on a machine with load-store
architecture in which memory can be accessed only through load and store
instructions. The variables a, b, c, d and e are initially stored in memory. The
binary operators used in this expression tree can be evaluated by the machine
only when the operands are in registers. The instructions produce result only in a
register. If no intermediate results can be stored in memory, what is the minimum
number of registers needed to evaluate this expression?

Gate CS-2011 Question Paper With Solutions

 

(A) 2

(B) 9

(C) 5

(D) 3

Answer: (D)

Explanation:

Gate CS-2011 Question Paper With Solutions

Learn More:   Gate ME-2016-1 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here