Cognizant interview question

To write a program in c++ involving string manipulation