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

Explain what is meant by high-order and low-order bytes?

0 Answers  


c pgm count no of lines , blanks, tabs in a para(File concept)

2 Answers  


how can f be used for both float and double arguments in printf? Are not they different types?

0 Answers  


Explain what are the advantages and disadvantages of a heap?

0 Answers  


Can a variable be both constant and volatile?

0 Answers  






How can a number be converted to a string?

1 Answers  


how to estimate the disk access time? e.g. the time between read one byte and another byte in the disk.

3 Answers   Google,


write c program to display output 10(10+20)+(10+20+30)+ ... n term

0 Answers   Hindustan Gum Chemicals,


Write any data structure program (stack implementation)

1 Answers   HTC,


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

0 Answers  


How many loops are there in c?

0 Answers  


Explain can the sizeof operator be used to tell the size of an array passed to a function?

0 Answers  


Categories