Sunday, October 4, 2015

Tutorial Looping or Iteration in C Programming Language

Hey guys! Now I will tell you about looping or iteration in C programming language.
Loops in C programming language is used to repeat block of code until the condition is false.
There are 3 types of loops in C programming :
1. for loop
2. while loop
3. do...while loop
Now, I will tell u about the loops.

For loop
For loop syntax :

      for(initializations;test expression;update statment) {
           body of loop;
      }

Flowchart of for loop in C programming language 

While loop
While loop syntax :

       while(text expression) {
               body of loop;
               update statement;
      }



Flowchart of while loop in C programming 

Do...while loop
Do...while loop syntax

       do {
       body of loop;
       }
       while(text expression);

Flowchart of working of do...while loop in C programming.

That's all for today! Have a great time with coding! ^^

No comments:

Post a Comment