19 lines
375 B
Plaintext
Raw Normal View History

2025-11-22 22:22:43 +01:00
int main() {
int counter = 0;
printf("Testing while(1) endless loop with counter:\n");
while (1) {
printf("Loop iteration: %d\n", counter);
counter = counter + 1;
if (counter == 10) {
printf("Reached 10 iterations, exiting\n");
return 0;
}
}
printf("This should never print\n");
return 0;
}