1.break statements
The use of a break statement is primarily a switch statement and a looping structure. Break statement, exit the loop directly and execute the first statement below the loop structure. If a break statement is used in a multiple nested loop, when the break statement is executed, the loop structure in which it resides is exited, and the outer layer loop has no effect.
2.continue statements
The continue statement does not really exit the loop, but only ends the execution of the loop, so pay attention to this when using continue.
3.return statements
If a return statement is encountered in the program, then Caffrey exits the execution of the function, bounces back to the function's call, and, if it is the main () function, ends the entire program running.
4.exit statements
The most important difference between the exit () function and the return statement is that calling the Exit function ends the current process, deleting the memory space occupied by the child process, and passing the return information to the parent process. When the argument in exit () is 0 o'clock, the exit is normal, the other return value indicates an abnormal exit, and the exit () function means that the process is finished.
The difference between break, continue, return, and exit in a looping structure