Originally posted by Akash:
Hi Folks
This runs fine. No systax error, no infinite loop also.
No, this is an infinite loop. Just because the output stops, doesn't mean that the loop ends. The fact is that the output only occurs when i <= 10. Also, i is only incremented while i <= 10.
Therefore, i will eventually become 11, and the loop will cycle endlessly, doing nothing. Try modifying the loop to this to see the infinite loop:
Corey