(ANSI) C Reference – Control the Flow

A look at with which commands you can alter the flow of a C program.

You could also take a look at the C If – Switch statement tutorial.
You could also take a look at the C Loops tutorial.

{ } –>  Block delimiters

; –>  Statement terminator

break –>  Exit from switch, while, do, for

continue –>  Next iteration of while, do, for

goto label –>  Go to

label: –>  Label

return expr –>  Return value from function

if (expr) statement –>  if statement

else if (expr) statement –>  else if statement

else statement –>  else statement

while (expr) –>  while statement


for (expr1; expr2) –>  for statement


do statement –>  do statement

while (expr); –>

switch (expr) –>  switch statement


case const1: statement1 break;

case const2: statement2 break;

default: statement


This entry was posted in Control the Flow of a Program. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed. Tweet This! Tweet This! or use to share this post with others.

Comments are closed.