Goto and label statement: -
A goto statement can cause the program control to the end up almost any where in the program. The general syntax of goto statement is:
Goto label name;
…...
Label name:
Statement 1:
Statement 2:
…….
Where label name is a label name that tell goto statement where to jump. You have to place label name in two places. One is at that place following the goto statement and the other is the place where the goto statement is going jump.
Also the program place for the goto statement to jump can be appeared either before or after the statement.
Posted by: Wasim Javed
No comments:
Post a Comment