3 ms·
It will cause compiler errors, so it's not all that sneaky: int main(void) { while (1) break; return 0; }
by psykotic 15y ago
It will cause compiler errors, so it's not all that sneaky:
int main(void)
{
while (1) break;
return 0;
}
- huhtenberg 15y agoIt may rather than will. This ^ is a rather odd, syntax abuse case.
- psykotic 15y agoWhat do you mean? You will get a compiler error in any case where there is a break or continue in an outermost while block. There's nothing odd or uncommon about that. Here's something closer to a real program: int main(void) { while (1) { char c = getchar(); if (c == 'q') break; process(c); } return 0; }
- huhtenberg 15y agoUgh. You are right of course. I had a brain spasm.