C#

While

The test condition is given in the beginning of the loop and all statements are executed till the given boolean condition satisfies when the condition becomes false, the control will be out from the while loop.,

 

Do While

Do while loop is similar to while loop with the only difference that it checks the condition after executing the statements, i.e it will execute the loop body one time for sure because it checks the condition after executing the statements.,

 

For Loop

For loop has similar functionality as while loop but with different syntax.,for loops are preferred when the number of times loop statements are to be executed is known beforehand.,The loop variable initialization,condition to be tested,and increment o decrement of the loop variable is done in one line in for loop thereby providing a shorter,easy to debug structure of looping,