C Programming Goto Statement
C Programming Goto Statement
In C programming, goto statement is used for altering the normal sequence of program execution by transferring
control to some other part of the program.
In this syntax, label is an identifier. When, the control of program reaches to goto statement, the control o f the
program will jump to the label: and executes the code below it.
return 0;
}
Output
Maximum no. of inputs: 4
Enter n1: 1.5
Enter n2: 12.5
Enter n3: 7.2
Enter n4: -1
Average: 7.07
Though goto statement is included in ANSI standard of C, use of goto statement should be reduced as much as
possible in a program.