Loop Control Statements in C

Computer programs solve repetitive tasks by using loop control statements. The main idea of using loop control statements is to reduce the program length by mechanizing/using the same code repeatedly to solve similar kinds of tasks. In C programming there are mainly two types of looping constructs, and they are.

  • Entry controlled loops (for, while)

They have a control mechanism or test condition at the beginning of the loop.

  • Exit-controlled loops(do while)

They have a control mechanism or test condition at the end of the loop.