Recursion-convert string to integer

i am not able to understand a question properly.please elaborate.

Hi @SOHAN
The idea is to convert each character into ASCII format and form the number. What you need to do is that take each character of a string and then convert it to int. For example if a string is given as 12 then we can form number as
int n = ( s[0] - ‘0’ )*10 + ( s[1] - ‘0’ );
So overall to convert a sting character to int then you have subtract ‘0’ from that character.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.