Goto statement : the goto statement same as our house lift. If we want to goto the fourth floor than the lift is direct arrived us in the fourth floor. And if we want to goto the one floor than the lift goto up to down.
Wherever the user want the goto statement direct arrived us in that place. There are no condition just the label is used.
Example :
#include<stdio.h>
void main()
{
Int a, b;
b:
printf(" well come to my website ") ;
printf("Enter a number ") ;
scanf(" %d", & a) ;
if(a==1)
{
goto b;
}
}
out put : well come to my website.
Enter a number 2.
❮ Previous Next ❯
0 Comments