what is the difference between while and do while?

Answers were Sorted based on User's Feedback



what is the difference between while and do while? ..

Answer / jithender palle

In while case first execute the condition then ++/--,
In do while first ++/-- then condition execute

Is This Answer Correct ?    9 Yes 0 No

what is the difference between while and do while? ..

Answer / bhairavi

in while loop first condition is checked & then ++/-- is
done, in do while first whatever the condition given loop
execute atleast once ie.if i=0 the condition is while
(i<=0), i++ then also in do while loop i will increment
first & then it will check the condition so final value of
i will be 1

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C Interview Questions

What is the maximum length of an identifier?

0 Answers  


What should be keep precautions while using the recursion method?

1 Answers  


Why doesnt long int work?

0 Answers  


What is the use of function overloading in C?

0 Answers   Ittiam Systems,


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

0 Answers  






for questions 14,15,16,17 use the following alternatives:a.int b.char.c.string.d.float

1 Answers  


What are the advantages of the functions?

0 Answers  


define function

4 Answers   Assurgent, Sonata,


main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }

6 Answers  


What is the data segment that is followed by c?

0 Answers  


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

0 Answers  


What does 2n 4c mean?

0 Answers  


Categories