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
87 views
asked Jan 9, 2014 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 Jan 9, 2014 by rajesh Guru (39,140 points)

Related questions

0 votes
1 answer 34 views
0 votes
1 answer 417 views
0 votes
1 answer 102 views
102 views asked Jan 8, 2014 by sara Guru (24,570 points)
0 votes
1 answer 195 views
0 votes
1 answer 150 views
...