5.0010.f 

 

Now, inside the program we find the code:

 

                for (i = 0; i < 3; i++)

                        rec++;

 

f.    What is the value of variable i at the end of the loop

 

All we need to do is look at the condition check (i < 3). That means that as soon as I becomes 3, we will stop.

 

Therefore  the value of variable i at the end of the loop