Go To Statement In C


We can use go to statement for execute group of statement repetition until condition not match. It’s one types of jump statement.


Simple example of goto statement in c

#include <stdio.h>

#include<conio.h>;

void main(){

int c=0;

clrscr();

start :

c++;

if(c<=10)

{

printf(“%d \t”,c);

go to start;

}

getch();

}


Output
1 2 3 4 5 6 7 8 9 10