Ad Code

The use of do.... while loops should be avoided. why ?

The use of do.... while loops should be avoided. Explain why ?

The use of do.... While loops should be avoided. There are two reasons for this. First is that the construct is superfluous; Any statement that can be written as a do.... while loop can equally well be written as a while loop or a for loop. Complexity is reduced by minimizing the number of constructs being used. The other reason is of readability. A loop with the conditional part at the end is more difficult to read than one with the conditional at the top.
Reactions

Post a Comment

0 Comments