Thursday, 28 May 2015

How do...while loop works?

The statement/s inside body of loop is executed at least once, that is, the statement/s inside braces { } is executed at least once. Then the test expression is checked. If the test expression is true, the body of loop is executed. This process continues until the test expression becomes false. Since the body of loop is placed before the test expression in do...while loop, the body of loop is executed at least once. 






0 comments:

Post a Comment