The while loop is an entry control loop, i.e. it first checks the condition in the while(condition){ ...body... }
and then executes the body of the loop and keep looping and repeating the procedure until the condition is false.
The do while loop is an exit control loop, i.e. it checks the condition in the do{...body...}while(condition)
after the body of the loop has been executed (the body in the do while loop will always be executed at least once) and then loops through the body again until the condition is found to be false.
Hope this helps :)
For Example:
In case of while loop nothing gets printed in this situation as 1 is not less than 1, condition fails and loop exits
int n=1;
while(n<1)
cout << "This does not get printed" << endl;
Whereas in case of do while the statement gets printed as it doesn't know anything about the condition right now until it executes the body atleast once and then it stop because condition fails.
int n=1;
do
cout << "This one gets printed" << endl;
while(n<1);