Difference between for and While:
For Loop:
for..loop statements are used to perform certain task for more than one times.
It is an entry controlled loop.
The for statement, first part initializes the loop. Initilization is executed only once. Here one or more variables can be initialized.
The Second part tests the condition, if result of the condition is true then it enters the loop part, it comes out of loop when result of the condition comes out to be false.
The third part is used for increment or decrement. More then one expressions can be used in increment/decrement.
While Loop:
When a loop is described with a while statement , you can only specify the looping condition.
It is an entry controlled loop.
If the result of loop condition is true then the loop block is executed.
When the result of loop condition become false, it executes next statements, written after block scope.
Read more with Example:
http://cbtsam.com/cppl1/cbtsam-cppl1-054.php