break
: a break
keyword, breaks out of the switch block.
continue
: The continue
statement breaks one iteration (in the loop), if a specified condition occurs, and continues with the next iteration in the loop.
// Break
for (i = 0; i < 10; i++) {
if (i == 4) {
break;
}
printf("%d\n", i);
}
// Continue
for (i = 0; i < 10; i++) {
if (i == 4) {
continue;
}
printf("%d\n", i);
}