Cognizant interview question

4 to 5 Aptitude questions. 2 programs 1.add two strings. 2.reverse a string