Question #292403

What happens if the condition in a while loop is initially false? Explain and differentiate


between while and do while statement in ‘C’ language.

Expert's answer

If the condition in a while loop is initially false, then the loop will not be executed once.

In loop do-while, unlike a while one, the termination condition is checked after the body of the loop is executed. Thus, the body of the do-while loop will be executed at least once, regardless of its termination condition.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS