PROGRAM TO ILLUSTRATE FORWARD AND BACKWARD JUMP
// prg to illustrate forward jump
#include<stdio.h>
void main()
{
printf("\n start of program :");
printf("\n Forward jump program :");
goto label;
printf("\n I am inside label");
label:
printf("\n end of the program");
}
output:
void main()
{
printf("\n start of program ");
label:
printf("\n I am inside the label");
goto label;
printf("\n end of the program");
}
// prg to illustrate forward jump
#include<stdio.h>
void main()
{
printf("\n start of program :");
printf("\n Forward jump program :");
goto label;
printf("\n I am inside label");
label:
printf("\n end of the program");
}
output:
// prg to illustrate backward jump
#include<stdio.h>void main()
{
printf("\n start of program ");
label:
printf("\n I am inside the label");
goto label;
printf("\n end of the program");
}
output:
No comments:
Post a Comment