Infosys interview question

basic question only as it was a campus section