Articles added in Mathematics Lab | Cyber Lab is now open | Astronomy Lab is now open | VLSI Lab is now open | 120 SEO Tips article published | More exciting articles coming soon!




2.3.1 goto statement

To transfer the control from one part of the program to some other part of the same program, goto can be used.

Syntax:
goto statement label;
--> statement label should be a valid C++ identifier.
--> e.g. goto xyz, goto loop,etc.

If there is a statement “goto loop;”, then there should be a statement in the same program preceded by “loop:”. After executing goto loop, the control will be transferred statement following “loop:”.

Normally, goto statement will be used to create repetition with if statement. Using goto statement, control can be transferred out of a loop, but using goto statement, we cannot jump into a loop.






CACKLE comment system





Programming Resources
Computer Networking Fundamentals Android Application