What is the diffrent between while and do while statement ?

Answer Posted / ashok

(1)while loop is known as entry control loop.
and do while is known as exit control loop.

(2)in while loop first check given the condition & if it is
true then execute all statement of while loop.if it is
false then terminate control from loop.
and in do while loop first execute all statement of it and
then check condition, if yes it is true, then again do
while loop will execute, if it is false then terminate
control from loop,put semicolon after while statement.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how we can make 3d venturing graphics on outer interface

3982


Why is c called c?

615


What does p mean in physics?

575


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

663


What is the use of ?: Operator?

655






Is array a primitive data type in c?

566


What is the most efficient way to store flag values?

676


How can I do serial ("comm") port I/O?

676


How many levels of indirection in pointers can you have in a single declaration?

585


what are bit fields in c?

594


How to explain the final year project as a fresher please answer with sample project

459


What does %c mean in c?

637


Explain the advantages of using macro in c language?

566


What is an lvalue?

623


What is identifiers in c with examples?

665