Question: Given a short code as follows: int a,b; a = 2; b = a + 3; while (a%2 == 1) { a = a +
Given a short code as follows:
int a,b;
a = 2;
b = a + 3;
while (a%2 == 1)
{
a = a + 2;
if (a <= 5) then {
b = b - 1;
a = a + 2;
}
else
a = a - 1;
}
a. Create the three address code
b. Draw the flow graph
c. Is there anything that can be optimized from the intermediate code? If so, what parts can be optimized and provide an explanation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
