Infosys interview question

Basic questions