Infosys interview question

Puzzles during interview