Why the statement while(1) continues to execute infinetely in C programming?

Responses (1)

The condition tested in a while loop can be any valid C++ expression. As long as that condition remains true, the while loop will continue. You can create a loop that will never end by using the number 1 for the condition to be tested. Since 1 is always true, the loop will never end, unless a break statement is reached.

Votes: +0 / -0