C

Loops in C Lanugage

In any programming language, loops are used to execute a set of statements repeatedly until a particular condition is satisfied.

How it Works looping

A sequence of statements are executed until a specified condition is true.
This sequence of statements to be executed is kept inside the curly braces { } known as the Loop body.
After every execution of loop body, condition is verified, and if it is found to be true the loop body is executed again.
When the condition check returns false, the loop body is not executed.

There are 3 type of Loops in C language

  • for loop
  • while loop
  • do while loop



Subscribe us on Youtube

Share This Page on

Question


Abdullah | 20-Oct-2018 10:31:23 pm

what is the difference between all three loops? Why C programming language has 3 loops if all works the same way. I have read an article of loops in that article everything is discussed but not the difference, So I am asking this to you.


Ask Question