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

Do pointers need to be initialized?

1074


Can two or more operators such as and be combined in a single line of program code?

1365


What is the purpose of the statement: strcat (S2, S1)?

1165


how many errors in c explain deply

2085


Explain main function in c?

1079


What is the significance of an algorithm to C programming?

1042


What is the difference between int main and void main in c?

1173


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

3173


Explain how can a program be made to print the line number where an error occurs?

1206


Can a variable be both const and volatile?

1128


can we change the default calling convention in c if yes than how.........?

2531


What is the usage of the pointer in c?

1108


Where can I get an ansi-compatible lint?

1143


provide an example of the Group by clause, when would you use this clause

2188


What is %g in c?

1078