Monday , November 18 2019

C #09 – While Loop in C Language


While Loop in C Language

A while loop statement in C programming language repeatedly executes a target statement as long as a given condition is true.(Non-Specific End point).

Syntax:

The syntax of a while loop in C programming language is:

initialization

while(condition)
{
   statement(s);
   increment/decrement.
}
void main()
{
    int i=0;  // Initialization+Decleration
    clrscr();
    while(i<10)  //Condition
    {
        printf("%d\n",i);
        i++;  //Increament
    }
    getch();
}

 

 

About Faheem

Faheem
An adaptable and responsible Software Engineer, who enjoys working with computers and the opportunity to learn new skills and work with new technologies is particularly attractive to me.

Check Also

C #07 – Operators in C Language

Operators in C Language An operator is a symbol that tells the compiler to perform …

Leave a Reply

Your email address will not be published.