Infosys Interview Question

Just some basic coding questions