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
How many loops are there in c?
Write a c program to demonstrate character and string constants?
I have a varargs function which accepts a float parameter?
Write a C program in Fibonacci series.
which type of aspect you want from the student.
Explain enumerated types.
Explain how can I convert a number to a string?
Under what circumstances does a name clash occur?
What is the scope of static variables in c language?
What is a volatile keyword in c?
What is the difference between struct and typedef struct in c?
What is indirection?
What is the use of ?: Operator?
What is meant by int main ()?
What are called c variables?