Infineon Technologies Interview Question

How to come out of infinity loop in while-loop?