Home > Article > Backend Development > What is the function of continue in C language?
The function of the "continue" statement in the C language is to skip the remaining statements in the loop body and go directly to the end of the loop to end the loop and forcibly execute the next loop. The continue statement only ends this loop, but does not terminate the execution of the entire loop; the break statement ends the entire loop process and no longer determines whether the conditions for executing the loop are established.
The function of the continue statement is to skip the remaining statements in the loop body and go directly to the end of the loop to end the loop and force the execution of the next loop.
In C, Java, and MATLAB languages, the general form of the continue statement is "continue;"
is used in C and C#.
Its function is to end this cycle. That is, jump out of the following unexecuted statements in the loop body, and continue to solve the loop conditions for the while loop. For the for loop program flow, the third part of the expression in the for statement header is then solved.
The difference between the continue statement and the break statement is:
The continue statement only ends this loop, but does not terminate the execution of the entire loop. The break statement ends the entire loop process and no longer determines whether the conditions for executing the loop are established.
Recommended tutorial: "C Language"
The above is the detailed content of What is the function of continue in C language?. For more information, please follow other related articles on the PHP Chinese website!