Tuesday, February 22, 2011

do while loop in c



Explanation
of do while loop in c programming language by examples, questions and answers



It is also
called as post tested loop. It is used when it is necessary to execute the loop
at least one time. Syntax:



do {

Loop body

} while (Expression);



Example:



void main(){

int num,i=0;

clrscr();

do{


printf("To enter press 1\n");


printf("To exit press 2

No comments:

Post a Comment