+ 1
What happens when the for loop doesn't have any test condition ?
will the programm executes till infinity or gives an error
5 Answers
+ 11
It will run infinetly
+ 2
if nothing "breaks" the loop it will run forever, no condition results to true so you have an infinite loop.
+ 1
it will not stop
+ 1
You cannot say that it will run infinitely (not for sure). You can have a break within your code or depending on this peace of code does, it can drain all memory and stop.