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;
|
|
}
|