Cognizant interview question

Factorial and string search in a character array programs.