English

State the Difference Between While and Do While Loop.

Advertisements

Questions

State the difference between while and do-while loop.

Distinguish between while and do-while loop.

State one difference between while loop and do-while loop. 

Distinguish Between
Advertisements

Solution

S. No. while loop do-while loop
1. It is an entry-controlled loop.  It is an exit-controlled loop.
2. The statements can be executed. The loop executes the statement at least once.
3. The condition is tested before execution. The condition is tested after execution.
4. The loop terminates if the condition becomes false. If the condition is false, the computer keeps executing the loop.
shaalaa.com

Notes

Students should refer to the answer according to their questions.

Introduction of Nested Loop
  Is there an error in this question or solution?
Chapter 1.09: Iterative Constructs in Java - EXERCISES [Page 124]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.09 Iterative Constructs in Java
EXERCISES | Q V. 5. | Page 124
Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.09 Iterative Constructs in Java
EXERCISES | Q V. 7. (i) | Page 124
Advertisements
Share
Notifications



      Forgot password?
Use app×