It provides an unconditional jump from the goto to a labeled statement in the same function.
Remark: Use of goto statement is highly discouraged in any programming language because it makes difficult to trace the control flow of a program, making the program hard to understand and hard to modify. Any program that uses a goto can be rewritten so that it doesn't need the goto.
Syntax:goto label;
.
.
.
label: statement;
Here label can be any identifier and it can be set anywhere in the C program above or below to goto statement.
No comments:
Post a Comment