Infosys interview question

Questions were from the course learnt