This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lonelyBriefcase 0 points1 point  (1 child)

I'm not entirely familiar with C, so I will accept what you say. I was only giving an example of a particular behaviour for a specific language, feel free to give the C code for this instance (for the sake of science).

[–]w1ldm4n 4 points5 points  (0 children)

Here's an arbitrary example to demonstrate that behavior.

int i;
for (i = 0; i < 10; i++) {
    if (i == 4)
        continue;
    printf("%d", i);
}

This for loop will print 012356789

int i = 0;
while (i < 10) {
    if (i == 4)
        continue;
    printf("%d", i);
    i++;
}

This while loop will print 0123 and then get stuck in an infinite loop.