C Program : Goto statement forward jump Example

 #include <stdio.h>

int main() { int i = 1; // Label for the forward jump forward_jump: if (i <= 5) { printf("This is iteration %d\n", i); i++; // Perform a forward jump to the 'forward_jump' label goto forward_jump; } printf("Loop has ended.\n"); return 0; }

Comments

Popular posts from this blog

Video Formats

Where video editing is used

File saving and folder management