VIT Infotech Interview Question

program to extract substring