Pregunta de entrevista de Cognizant

To write a program in c++ involving string manipulation