Answer to Question #292403 in C++ for Muskan

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.

1
Expert's answer
2022-02-01T14:11:14-0500

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog