Exit criteria is defined as condition which must be met before completing a specific task. It is a predefined set of conditions that must exist before you can declare a program to be complete.
Exit criteria is one of the most important components while defining a loop. As without an exit criterion, the program tends to enter in an infinite loop. These criteria differ from program to program as per the requirement.
For example, while creating a loop to print numbers from 1 to 1000, exit criteria is that loop should exit the block of code when the 1000th number is printed, else the program will enter an infinite loop.