- #1
PNGeng
- 17
- 0
This was a question from my C++ midterm.
I see an infinite loop, but the correct answer is 12. Can anyone explain this?
Question: What is the value of i after the loop exits?
I see an infinite loop, but the correct answer is 12. Can anyone explain this?
Question: What is the value of i after the loop exits?
Code:
int i;
for(i=0; i < 10; i++)
i+=3;
i=1;