Recursion codes of string

can anyone give hint to this problem

check this i have commented on imp. steps
https://ide.codingblocks.com/s/45401