The do – while loop is an exit-controlled loop. In do-while loop, the condition is evaluated at the bottom of the loop after executing the body of the loop. This means that the body of the loop is executed at least once, even when the condition evaluates false during the first iteration.
The do – while loop syntax is:
do
{
Body of the loop;
}
while(condition);