Infosys interview question

Very basic.