Q:

What is the difference between while, do while and for loop?

0

What is the difference between while, do while and for loop?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

1) While loop checks for the condition first so it may not even enter into the loop if the condition is false.
2) do while loop executes the content of the loop once before checking the condition of the while.
3) For loop is similar to while loop except, the initialization of variable, condition check & increment happens at one place.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Top 100 C# interview questions and answers 2022

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What is the difference between “constant” and ... >>
<< Is multiple inheritance supported in C#?...