What is goto statement in C.?

goto is a keyword as well as jumping statement. goto is use to transfer the control or jump.

goto statement always required label.

Syntax of goto statement:

	
    abc: ← colun
    
    ↑
    label_name with colun 
    

Goto with label use in two ways

Syntax:

1. backword declaration


	label_name:
    - - - -  -
     -- - - - 
     goto label_name;
    

Syntax:

2. forward declaration


	goto label_name;
    - - - -  -
     -- - - - 
     label_name:
    

Previous Break Statement Next Return Statement

Advertisement here

Share this Page.

Post Your Comment