Infosys interview question

Asked the simple question based on logic