I am not able to know what basic difference in between Do-While loop and While loop. How can we decide which loop will be proper for the particular test condition?
Any suggestion???
I am not able to know what basic difference in between Do-While loop and While loop. How can we decide which loop will be proper for the particular test condition?
Any suggestion???
In a while loop the condition is first tested and if it returns true then it goes in the loop, In a do-while loop it enters the loop first and does the first iteration and then does the checking at the end.... If at the end in a do-while loop it returns true the second iteration follows, but if it returns false then it goes out of the loop...
Bookmarks