The goto statement is known as jump statement in C language . The goto statement is used for transferring the control of a program to a given label.
This is used to transfer program's control from one statement to another statement.
goto label or statement;
#include void main() { int goals; printf("Enter No Of Goals:"); scanf("%d,&goals"); if(goals<=5) goto error; else { printf("You Are Welcome"); exit(); } error: printf("Sorry Try Again"); }
output:-
Enter No Of Goals:
Sorry Try Again
Enter No Of Goals:
You Are Welcome