Tuesday 22 February 2011

while loop in c programming





While loop:



It is pre tested
loop. It is used when we have to execute a part of code in unknown numbers of
times.

Syntax:



while (Expression){

Loop body

}



Properties of while loop:



1. Task of the
expression is to check the condition. Loop will execute until condition is true
otherwise loop will terminate.  



2. If any
expression returns zero then condition will false and if it

No comments:

Post a Comment