Unconditional Control Transfer Statements in C

Unconditional Control Transfer Statements are used to transfer the control to some other place in the program. In C Programming Language, There are four types of unconditional control transfer statements.

    • 1. goto

 

    • 2. break

 

    • 3. continue

 

    4. return

goto statement:

The goto statement is used to transfer the control from one part of the program to another. It has the following syntax:

- - - - - - - - - - -
goto display;
- - - - - - - - - - -
- - - - - - - - - - -
display;
- - - - - - - - - - -

when this statement is executed, the control is transferred to the statement lebel

display

 which is followed by a colon.

break statement:

The break statement is used to transfer the control to the end of a statement block in a loop. It is an unavoidable statement to transfer the control to the end of a switch statement after executing anyone statement block. It has the following syntax:

break;

continue statement:

The continue statement is used to transfer the control to the beginning of a statement block in a loop. It has the following syntax:

continue;

return statement:

The return statement terminates the execution of a function, it returns control to the calling function. It resumes the execution in the calling function immediately.
It has the following syntax:

jump instruction or statement:
return expression;