User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:control_structures:goto
click
to support this page (eg 0,42 € or so) Thanks.

goto

  Syntax: 
  goto Jumppoint;
  
  Jumppoint: e.g. instruction function

C Sourcecode Example

#include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
 
 
int main( void ){
 
int i;
 
for (i=0;i<=99;i++) {
    if (i==42) {
        goto jump_point;
    }
}
 
jump_point: printf("Found the answer %i ... is this right ?\n",i);
 
return 0;
}
  output
  cd@najai:~$ ./goto 
  Found the answer 42 ... is this right ?
advertising
c/control_structures/goto.txt · Last modified: 2013/01/22 22:02 (external edit)

Impressum