The least number of temporary variables required to create a three-address code in static single assignment form for the expression a=b * d – c + b * e – c is ______
(A)
3
(B)
4
(C)
5
(D)
6
Answer: (B)
Explanation:
a=b * d - c + b * e - c
t1 = b * d
t2 = b * e
t3 = t1 + t2
t4 = t3 -c
a= t4 -c
Total temp variables = 4
So, option (B) is correct.
Refer – Static Single Assignment
Quiz of this Question
Please comment below if you find anything wrong in the above post