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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!