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

In C language what is a 'dangling pointer'?

640


What is the sizeof () operator?

625


What are nested functions in c?

567


What is non linear data structure in c?

578


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1498






What is ambagious result in C? explain with an example.

2058


Write a program to find the biggest number of three numbers in c?

589


What is null pointer constant?

596


Explain how are portions of a program disabled in demo versions?

656


Write a Program to accept different goods with the number, price and date of purchase and display them

5453


diff between exptected result and requirement?

1596


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

680


#include { printf("Hello"); } how compile time affects when we add additional header file .

1425


What is null character in c?

692


What's the difference between constant char *p and char * constant p?

659