6. Thedifference lies in the place where the condition is tested.
The while loop tests the condition before executing any of the statements within the while loop whereas the do-while loop tests the condition after the statements have been executed within the loop.