This loop is also use to execute group of statement repeatedly but upon verifying condition as true except for first iteration.

For first iteration the condition cannot be verified the condition will be check from second iteration onwards. This loop is always terminated by semi colon.

Syntax: –

                 Do
                            {
                            Statements;
                            Updation;
                            }while(condition);

Flow chart of do-while loop: –

flow chart of do-while loop.png

 

Advertisements