Computer Science
Distinguish between:
Exit controlled loop and Entry controlled loop
Java Iterative Stmts
21 Likes
Answer
Exit controlled loop | Entry controlled loop |
---|---|
It checks the condition after executing its body. If the condition is true, loop will perform the next iteration otherwise program control will move out of the loop. | It checks the condition at the time of entry. Only if the condition is true, the program control enters the body of the loop. |
The loop executes at least once even if the condition is false. | Loop does not execute at all if the condition is false. |
Example: do-while loop | Example: for and while loops |
Answered By
11 Likes
Related Questions
What are the advantages of Scanner Class? Explain.
Distinguish between:
Finite loop and Infinite loop
What is a token? Explain these methods while reading token from Scanner object.
(a) nextlnt( ) (b) nextDouble( )
(c) next( ) (d) nextLine( )With reference to switch case, explain the following:
(a) Default case
(b) Fall through