- Basically, we can say it Local Goto because the visibility is within the loop or function.
- Goto statement; we can use it as forward jump and also for backward jump.
- While working with Goto we need to observe two main things: 1. Setting a label and 2. Calling the label.
- It can be used within the function, we can’t use Goto to jump from one function to another.
- Non – local Goto is used in LINUX for a jump from one function to another function.
- Backward call :
2. Forward call :
- Label name shouldn’t be a Keyword i.e int, char & constant also i.e. goto 10; goto 11 etc.
- Only variable is allowed i.e. goto a, goto i etc.
- After labelling goto, at – least one statement should be there otherwise it will give an error.