Syntax of do while loop

In do while loop first iteration always be executed even the condition is false.If you think

do-while

as English like language word, it says- first do then check condition given in while.
Example:
condition is false at first iteration:

OUTPUT

I am inside do-while() loop

condition is true at first iteration:

OUTPUT

I am inside do-while() loop
I am inside do-while() loop


Next Previous