actually there is no major difference between the two loops. They are both extremely similar in the way they work. The only difference is the way they are coded - syntax wise. Ex:for(int i=0;...
no difference in logic in both of them you put the key to enter :while( ....),for(;....;)
but in for loop you have option to initialize value and make operation on it
for(int...
A do while loop will evaluate a certain condition at the end of every loop. It is up to the programmer to increment variables. A for loop includes the variable incrementing, and checking the end of...
Both the for loop and the while loop execute the loop block until a particular condition is satisfied. The for loop is a compressed form of while loop because the loop counter and loop condition are...
do { //statements }while(condition); The statements inside the block get executed at-least once, no matter what condition you have placed. Only from the 2nd time the condition is checked, simply...