Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the diffrent between while and do while statement ?

Answer Posted / shwetha karkera

In WHILE STATEMENT, the condition is tested first, and then
the statements are executed if the condition turns out to
be true. hence, it is calles as PRE-TESTED LOOPING
CONSTRUCT.

In DO WHILE STATEMENT,the statements are executed for the
first time and then the conditions are tested. if the
condition turns out to be true,then the statements are
executed again.hence it is called as POST-TESTED LOOPING
CONSTRUCT.

SYNTAX FOR WHILE STATEMENT:
while(condition)
{
statement;
}


SYNTAX FOR DO WHILE STATEMENT:
Do
{
statement;
}
while(condition)

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In a switch statement, what will happen if a break statement is omitted?

1005


What is the Purpose of 'extern' keyword in a function declaration?

1032


Is it possible to initialize a variable at the time it was declared?

1172


What does typeof return in c?

1018


How do you print only part of a string?

964


Explain what are the __date__ and __time__ preprocessor commands?

1072


What is dynamic memory allocation?

1282


How can a process change an environment variable in its caller?

1127


Explain why C language is procedural?

1164


what is use of malloc and calloc?

1845


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

2702


is it possible to create your own header files?

1044


what is uses of .net

1681


Can a pointer be static?

1018


Why c is procedure oriented?

995