Wednesday, December 14, 2022

[FIXED] What does "for(;;)" mean?

Issue

In C/C++, what does the following mean?

for(;;){
    ...
}

Solution

It's an infinite loop, equivalent to while(true). When no termination condition is provided, the condition defaults to false (i.e., the loop will not terminate).



Answered By - Justin Ardini
Answer Checked By - Cary Denson (PHPFixing Admin)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.