State one difference and one similarity between while loop and do-while loop.
72 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
44 Likes
Distinguish between while and do-while loop.
What is meant by an infinite loop? Give an example.
What is the purpose of using break statement in a program?
What is the purpose of using continue statement in a program?