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
In a switch statement, what will happen if a break statement is omitted?
What is the Purpose of 'extern' keyword in a function declaration?
Is it possible to initialize a variable at the time it was declared?
What does typeof return in c?
How do you print only part of a string?
Explain what are the __date__ and __time__ preprocessor commands?
What is dynamic memory allocation?
How can a process change an environment variable in its caller?
Explain why C language is procedural?
what is use of malloc and calloc?
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
is it possible to create your own header files?
what is uses of .net
Can a pointer be static?
Why c is procedure oriented?