Virtusa interview question

Pgm for string manipulation