Answer:
The loop increments the value of new while the loop condition is true
The end value of new is 3
Step-by-step explanation:
Given
The above code segment
Required
What the loop does and the result
We have:
--- initialize new to 0
--- The loop condition;
i.e. the loop will be repeated 3 times (when i = 3, 4 and 5)
--- For each increment of i, new is incremented by 1
So, the value of new is:
i = 3: new = 0 + 1 = 1
i = 4: new = 1 + 1 = 2
i = 5: new = 2 + 1 = 3