Sentinel loops

In sentinel loops we don’t know that how many no. of times the loop will work!

That means that a sentinel loop can be regarded as infinite, indefinite loop.

For Eg:


Output will be an infinite loop printing “This is an infinite loop!” infinitely!! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *