Jump statements are control flow statements that allow you to modify the order in which programs execute. These statements give the programmer flexibility and control over the program's logic.
There are four types of jump statements in the C language:
The Break statement stops the execution of a loop or switch. It transfers program control to the next sentence, which is immediately following the loop or switch.
In C, the break statement can be used for the following:
The Continue statement skips the current iteration of the loop and transfers program control to the next iteration of it. Unlike the break statement, it does not terminate the loop execution.
A goto statement transfers program control to a labeled statement inside its scope. This function is used to exit a loop or nested loop and return to the outer loop. Makes program logic complex and difficult to understand.
When a function is completed, the return statement in C is used to provide the caller with a value. It is commonly used to return a value to the caller code.