Infosys interview question

Basic DSA question about loop conditions