Infosys Interview Question

The questions were simple.