Q47
The least number of temporary variables required to create a three-address code in static single assignment form for the expression is ________.
Show answer without attempting
Answer: 8
GATE CS · Compiler Design · 3 questions
3 Intermediate Code questions from GATE CS papers (2015), each with the official answer key. Part of Compiler Design. Answer any question right here and it is marked straight away, or practise them one at a time.
Answer: 8
Answer: C
(1) i = 1
(2) j = 1
(3) t1 = 5 * i
(4) t2 = t1 + j
(5) t3 = 4 * t2
(6) t4 = t3
(7) a[t4] = -1
(8) j = j + 1
(9) if j<=5 goto (3)
(10) i=i+1
(11) if i<5 goto (2)Answer: B
0/30 correct0 marks