Infosys Interview Question

Asked the simple question based on logic