goto example
for(i=0; iɝ i++)
for(j=0; jɝ j++)
for(k=0; kɝ k++)
if(i+j+k == 2)
goto out;
out:
printf("i=%d,j=%d,k=%d\n",
i, j, k);
The output is
i=0, j=0, k=2
Previous slide
Next slide
Back to first slide
View graphic version