![]() ![]() The while loop is the most fundamental loop available in C++ and Java. The iteration occurs at least once even if the condition is false at the first iteration. The iterations do not occur if, the condition at the first iteration, appears false. In 'do-while' loop the controlling condition appears at the end of the loop. In 'while' loop the controlling condition appears at the start of the loop. In this article, we are going to discuss the differences between “while” loop and “do-while” loop. ![]() Conversely, the do while loop is called the exit controlled loop. On the other hand, the do-while loop verifies the condition after the execution of the statements inside the loop.įurthermore, the while loop is known as the entry-controlled loop. Here, the main difference between a while loop and do while loop is that while loop check condition before iteration of the loop. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |