Facebook

do while

do-while loop

The functionality of do-while is slightly different from while and for loop.The condition of do-while is at the bottom of loop and it executes at least once even if the condition is false.The initialization of a variable loop is done before the loop block. Syntax do { set_of_statements; } while(condition);   Example 1 Say we… read more »

Sidebar