Pregunta de entrevista de CGI

Coding like finding substring and letters of each word