Loops 


C Programming Tutorial 

Go to the Table of Contents

Vist the Gifcom Corporation

Controlling repetitive processes. Nesting loops

Decisions can also be used to make up loops. Loops free a program from the straitjacket of doing things only once. They allow the programmer to build a sequence of instructions which can be executed again and again, with some condition deciding when they will stop. There are three kinds of loop in C. They are called:

  • while
  • do ... while
  • for

These three loops offer a great amount of flexibility to programmers and can be used in some surprising ways!