Using do-while loop we can repeat the execution of several parts of the statement. The do-while loop is similar to the while loop with one important difference. The body of do-while loop is executed at least once. Only then the test expression is evaluated.
The syntax of the do-while loop
//code to be executed
Let’s see the example of do-while loop