Jump Statements :
goto statement :
- It can transfer control anywhere in the same function of a program.
- The target destination of a goto statement is marked by a label.
- A label and goto must appear inthe same function.
- A label must not immediately precede a closing brace.
- A goto statement may not jump forward over a variable definition.It is only possible only if the variable definition is occuring in a block and the entire block is jumped.
break statement :
- It is used to skip over a part of a code or loop.
- It can be used to terminate while, do-while, for and switch statements.
- It immediately skips the rest of the loop and jumps over to the statement following the loop
continue statement :
- It is used to skip over the next statements of a loop and perform the next iteration.
- It must not be confused with break which takes you out of the loop wheres continue skips its following code in loop and performs next iteration.
printf(“ENter two numbers”);
printf(“n Denominator can’t be zero”);
return statement :
- It can be used to return value to calling code from the function and to immediate exit from the function to its caller function.
- A function may contain several return statement but only one of them should be executed.