DamnSchool
The goto statement transfer control unconditionally from one place to another place in the program.

A goto statement can cause program control almost anywhere in the program unconditionally.

The goto statement requires a label to identify the place to move the execution. A label is a valid variable name and must be ended with colon (;).

Continue statement

#include <stdio.h> void main() {
int sum=0;
for(int i = 0; i<=7; i++){
sum = sum+i; if(i==6){ goto addition; } }

addition: printf("%d", sum);
}


Run Example >

< Previous Next >

Privacy Policy Terms of Service About
Creative Commons License
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.