What happens if the condition in a while loop is initially false? Explain and differentiate
between while and do while statement in ‘C’ language.
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.
Comments
Leave a comment