Why is this infinite for loop terminating after some time?

Viewed 140

I am running this infinite for loop. Why is this for loop terminating after some time?

for(int i = 10; i > 0; i++) { }

But if I print something in this for loop then it is not terminating. Why so?

2 Answers
Related