this code runs correctrly on online ide, but when i run it on sublime it gives 1233 output, why this happens?
String into integer using recursion
sir bhot he gazab error h
i just returned a[0] in the base case
also changed the lines where u were returning the value
1 Like
yes, it worked, when n becomes 0 then array contains ‘\0’, then ''return 0" and “return a[0]” dono ek hi hoga ?
yes correctly pointed out
0 return hoga