State one difference and one similarity between while loop and do-while loop.
70 Likes
Similarity — Both while and do-while are suitable in situations where numbers of iterations is not known.
Difference — while is an entry-controlled loop whereas do-while is an exit-controlled loop
Answered By
42 Likes
What is the purpose of using continue statement in a program?
What is the purpose of using break statement in a program?
Distinguish between while and do-while loop.
What is meant by an infinite loop? Give an example.