C Program Demonstrate the Use of Goto Command
Turn Mobile View Off
by Dinesh Thakur

This program asks user to define the Goto Command. Goto command is a skip through command in C like if any condition got terminated or false the Goto command skip the process to desired location where it sets for skipping.

User takes the demo about if-else condition for defining the condition. Like user declares the variable a and b and find out the greater from a and b. user put the condition if-else if (a>b) and puts a GOTO command that prints or skip to A else GOTO b and prints a message A is greater or B is greater which condition lying true.

Problem Statement:

This is C program that asks user to demonstrate the GOTO command.

  1. Declare the variables.
  2. Using go to command.
  3. Display result on the screen.

Here is C source code for demonstrate the Go to Command. Output of this program shown below. 

int a,b;
printf("enter the value of a,b");
goto A;
 else goto B;
 A:printf("a is greater");
  goto End;
B:printf("b is greater");
 Demonstrate the Use of Goto Command
Dinesh Thakur is a Technology Columinist and founder of Computer Notes and Technology Motivation. Turn Mobile View Off