C Programing – Idea of Looping Statement – Part-1


C Programing

What is Loop?

Loop is a statement to be repeated. A loop is a program which consist of two segments,

a) Body of the Loop- Consist how the loop will run.

b) Control Statement- The control statement consists of certain conditions which are checked during execution and depending on the condition with in the body of Loop.

For Loop:

                   For (initialization;condition;increment)


                  body of loop


Now we will print 0-9 with for For loop………….


#include <stdio.h>

int main()
int x;

for ( x = 0; x < 10; x++ )   /* The loop goes while x < 10, and x increases by one every loop*/

/* Keep in mind that the loop condition checks
the conditional statement before it loops again.
consequently, when x equals 10 the loop breaks.
x is updated before the condition is checked. */
printf( “%d\n”, x );

Output:0 to 9

                                          ——————– Thanks Everyone


About Author


Former Asst. Manager (IT) - MGH Group MCA (Masters in Computer Application) From Sikkim Manipal University India. Have 5 years experience In IT field.

Leave A Reply

CAPTCHA ImageChange Image