Previous
Jumping statements are used to transfer the program’s control from one location to another.
Jumping statements are used to transfer the program’s control from one location to another.
There are four jumping statements in C language:
goto statement
the goto statement unconditionally transfers program control to a labeled statement, where the label identifier is in the scope of the function containing the goto statement. The labeled statement is the next statement executed.
The goto statement has the following syntax:
Flowchart:
return statement
The return statement terminates execution of a function and returns control to the calling function, with or without a return value. A function may contain any number of return statements. The return statement has the following syntax:
The break statement has the following syntax:
break;
Flowchart:
continue statement
The continue statement passes control to the end of the immediately enclosing while , do , or for statement. The continue statement has the following syntax:
Flowchart:
No comments:
Post a Comment