C# Question and Answer
C# Question and Answer
• https://www.youtube.com/watch?v=_TIAA-vg
NeY&index=10&list=PLAC325451207E3105
Difference between while and do while
loop
• https://www.youtube.com/watch?v=s7fVZZeN
Xec&list=PLAC325451207E3105&index=14
• While loops check the condition at the
beginning (starting loops)
• Do while loops check condition at the end of
loops.
• Do loop is guaranteed to execute at least one ,
as while loop not.
Difference between for and while loop
• While loop initialization at one place , condition check
another place and variable modifying at another place .
• Where for loop all of this at one place.
• While (condition) return true or false
• {
• increment value ;
• }
• For (i=0; i< length , i++)
• {
• }
Difference between for and for each loop