Recursion codes of the string

what is the problem in the code, please help asap