C Programming + Tutorials in C for Beginners

C Jumping Statements

Home  »  C Programming  »  C Jumping Statements


     There are three different controls used to jump from one C program statement to another and make the execution of the programming procedure fast. These three Jumping controls are:

a) goto statment
b) break statment
c) continue statment




goto statement

     The powerful Jumping statement in C-Language is goto statement. It is sometimes also called part of branching statement. The go to moves the control on a specified address called label or label name. The goto is mainly of two types. One is conditional and the other is unconditional.










break statement

     Break is always used with then decision-making statement like if and switch statments. The statement will quit from the loop when the condition is true.

The general syntax for break statement is as:

break;




Output is as :
I=1
I=2
I=3
I=4
I=5







Continue statement

     Continue statement also comes with if statement. This statment is also used within any loop statement like do loop, while loop and for statement.

The general syntax for continue statement is as:

continue;


This statement is skip some part of iteration (loop) and comes to the next looping step i.e. it will increment / decrement the loop value, when continue occurs.




Output is as :
I=1
I=2
I=3
I=4
I=5
I=7
I=8
I=9
I=10



<< Previous Topic
Next Topic >>



Previous
Next Post »

2 comments

Click here for comments
suman
admin
4 August 2019 at 05:44 ×

nice article for beginners.thank you.
java tutorial

Reply
avatar
Thanks for your comment