Infosys interview question

File Program