convert string to integer
Recursion usage
You have to simply check that if your length of string is 1, then simply return *str-‘0’, which means u are converting a single character to digit, else
return(10*convertstr_int(str,len-1)+str[len-1]-‘0’);