Infosys interview question

Basic question need to have programming skills