About Me

Hello there! Before talking about qualifications and professional abilities, I would like to introduce myself. I am a Yuvraj Basnet and professional software developer and have been working in this field for 3 long years. I have finished my graduation from The University of Delhi on Computer Science Engineering I considered myself a reasonably experienced programmer with a particular interest in the human side of software development, computers are fascinating machine, but they're mostly reflection of the people using them. In the art of software development, studying code isn't enough; you have to study the people behind the software, too.

C LOOPS

Loops are used in programming to repeat a specific block of statements (iteration)
After reading this tutorial, you will learn to create for loop, while loop
and do while loop in C programming.     

              

                                       LOOP

The process of repeatedly executing a collection of statement is called looping.
Loops are used in programming to repeat a block of statements until a specific condition is satisfied. 

There are three loops in C programming:

1)for loop
2)while loop 
3)do while loop

1)for loop: for loop is used to execute a set of statements repeatedly until a particular condition is satisfied.

   SYNTAX:

   Example:

    OUTPUT


2)while loop: If the test expression is true, statements inside the body of while loop is executed. The test expression is evaluated again. The process goes on until the test expression is false. 
while loop is also known as entry control loop.

    SYNTAX:
    
    EXAMPLE-

    OUTPUT

3)do while loop: It is necessary to execute body of the loop before testing the condition. Such situations can be met with the help of do while loop.
do while loop is also known as exit control loop.

   SYNTAX:

     EXAMPLE-
 



    OUTPUT

 



     










Post a Comment

0 Comments