Suppose if you want to execute certain statements for multiple times then you have to write them multiple times which make the program complicated and lenghty. To overcome this problem C language provides a feature called as looping.

Looping is a process in which given blocks of statements repeatedly executes till the condition is true. Looping is one of the most important concept in C programming language. Looping allows us to save our time by minimizing the number of statements which makes the program smaller and also helps to save our time.

looping-in-C

In C programming language there are four types of looping statements:

  1. while loop

    while loop is used to execute blocks of statements repeatedly until the condition returns false.

    For more about while loop visit my article on while loop in C.

  2. do..while loop

    do..while loop is similar to while loop except, in do while loop the loop body is executed at least one time even if the condition is false.

    For more about do..while loop visit my article on do..while loop in C.

  3. for loop

    for loop is a controlled loop which uses three expressions among which first is the initialization, second is the test condition and the last one is the counter updater.

    For more about for loop visit my article on For loop in C.