Loops in C Programming

What are Loops?

  • Looping is a process in which a sequence or path is repeated again and again until given condition becomes false.
  • In looping a program executes the sequence of statements many times until the given condition becomes false. 
  • A loop consists of two parts, a body of a loop and a control statement. 

Types of Loops

  • Depending upon the position of a control statement in a program, a loop is classified into two types:
  1. Entry controlled loop
  2. Exit controlled loop


Entry controlled loop
  • In an entry controlled loop, a condition is checked before executing the body of a loop. It is also called as a pre-checking loop.

Exit controlled loop
  • In an exit controlled loop, a condition is checked after executing the body of a loop. It is also called as a post-checking loop.

C programming has three types of loops:

  1. for loop
  2. while loop
  3. do-while loop

Post a Comment

Previous Post Next Post