| Colon (':') |
| Previous | Punctuators | Next |
Use the colon (':') to indicate a labeled statement:
start: x=0; ... goto start;Special case of labels are case-labels, which are used in multiple selection statements, for example,
switch (a)
{
case 1:
puts("One");
break;
case 2:
puts("Two");
break;
...
default:
puts("None of the above!");
}
Note: The GNU C allows creating of local labels, which are
useful in macro definitions.