C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

Out of do..while and while - - which loop is efficient ?

0 votes
90 views
asked by sara Guru (24,570 points)

1 Answer

0 votes
In a do..while loop, the statements are executed without testing the condition , the first time. From the second time only the condition is observed. This means that the programmer does not have control right from the beginning of its execution. In a while loop, the condition is tested first and then only the statements are executed. This means it provides better control right from the beginning. Hence, while loop is move efficient than do.. while loop.
answered by rajesh Guru (39,140 points)

Related questions

0 votes
1 answer 35 views
0 votes
1 answer 107 views
0 votes
1 answer 200 views
...