Infosys interview question

basic programming questions