Infosys interview question

Noth unexpected