Unconditional Control Transfer Statements in C

In C Programming Language, There are four types of unconditional control transfer statements.

  • goto
  • break
  • continue
  • return
  • 1. 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.

    2. 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;

    3. 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;

    4. 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;