Infosys Interview Question

Basic question regarding strings.