Infosys Interview Question

Basic stuff but it was simple