.Net, All Engineering Branch, Basic computer course, basic knowledge of networking, c coaching in bopal, C programming language, c++ language, coaching class for C, coaching class in Ahmedabad, computer class in bopal-ahmedabad, computer class in satellite-ahmedabad, computer coaching in Ahmedabad, Computer Engineering Coaching, Engineering Courses, goto statement in C Language, HTML, Java, learn C Online, learn Programming Languages at TCCI, PHP coaching, programming language, Python, TCCI Coaching Institute

Goto statement in C – tccicomputercoaching.com

Generally in Programming statements execute order wise. If developer don’t want to follow the sequence then have to instruction to compiler to jump the particular statement in coding. Goto is used to jump to that particular statement in coding.


There are 2 type of Jump:

1. Backward Jump:

Control goes back in coding from current statement.

2.Forward Jump:

Control goes forward in coding from current statement.


goto lable;

Example: This example represent both type of jump:



void main()


int a,c,x ;



printf(“enter the value of a “);




printf(“sorry negative no not allow: Please enter positiovr no again:”);

goto input;




goto print;


printf(“the value of a is %d”,a);




printf(“answer is %d”,x);



If user enter negative number then he/she will not allow to go ahead. Compiler push user to enter positive number again , so, control jump to back (input lable). When positive number will be entered then user can go ahead. There is also goto statement used. Which will display multiplication of variable c and a.

To learn more about C Language at TCCI.

Call us @ 9825618292

Visit us @ http://www.tccicomputercoaching.com