Infosys interview question

Program where asked