Computer Science, asked by rain358, 4 months ago

difference between for loop and do while​

Answers

Answered by HeartHacker13
2

Answer:

Initialization may be outside or within the loop. for loop is entry controlled loop. do-while is exit controlled loop.

Answered by shubhshubhi2020
1

Answer:

for loop:

for loop provides a concise way of writing the loop structure. Unlike a while loop, a for statement consumes the initialization, condition and increment/decrement in one line thereby providing a shorter, easy to debug structure of looping.

do-while loop:

do while loop is similar to while loop with the only difference that it checks for the condition after executing the statements, and therefore is an example of Exit Control Loop.

Explanation:

PLEASE MAKE ME BRAINLIEST......

Similar questions