#include<conio.h>
#include<stdio.h>
int main( )
{
int x;
printf("enter x");
scanf("%d",&x);
if(x>5)
goto sj;
else
{printf("x is less or equal to than 5 so you r in a non goto location \n");
goto eof;
}
sj:
printf(" x>5 so you are in goto directed statement\n");
eof:
getch();
}
5
x is less or equal to than 5 so you r in a non goto location
#include<stdio.h>
int main( )
{
int x;
printf("enter x");
scanf("%d",&x);
if(x>5)
goto sj;
else
{printf("x is less or equal to than 5 so you r in a non goto location \n");
goto eof;
}
sj:
printf(" x>5 so you are in goto directed statement\n");
eof:
getch();
}
OUTPUT
enter x5
x is less or equal to than 5 so you r in a non goto location
No comments:
Post a Comment