Consider the program below which uses six temporary variables \(a, b, c, d, e,\) and \(f\):
a = 10
b = 20
c = 30
d = a + c
e = b + d
f = c + e
b = c + e
e = b + f
d = 5 + e
return d + f
Assuming that all the above operations take their operands from registers, the minimum number of registers needed to execute this program without spilling is:
Correct Option is C. Practice regular variations of this Organization of a computer concept to build speed and accuracy.
Reinforce your conceptual grasp with related questions from NIMCET 2024:
Take timed full-length mock tests with authentic question distributions, negative marking (+12/-3 in Math), and instant All India Rank calculation.
Start Free Mock Test Series →