for loop it consists of 3 parts 1. initialization 2. condition 3. incrementation like for(i=1;i<=10;i++).This loop executes 10 times. While loop: This is an entry check loop. First it checks for...
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...
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...
The do loop is similar to the forloop, except that the expression is not evaluated until after the do loop's code is executed. Therefore the code in a do loop is guaranteed to execute at least once....