Question #292517

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

The execution flow won't go through while loop body, i.e. everything inside the curly brackets { ... } won't be executed. As for do { ... } while(false), the content in curly bracket wil be executed once before reading condition while (...). After that the loop content won't be executed anymore.


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