One and one only difference I found is "while" loop first checks the condition and then enters into the loop block statements. In "do ... while() ", at least once statements execute then it checks for loop condition. Both are loops and which one should be used it depends on requirement.
While loop is entry controlled loop and do while loop is exit controlled loop.
The do while loop executes the content of the loop once before checking the condition of the while. Whereas a while loop will check the condition first before executing the content. therefore do while runs the loop atleast once even though the loop condition is false.
while(i<10); { i++; printf("%d,\n", i); }
Loop does not run for 10 iterations, what is the error?