fork(1) download
  1. #include <stdio.h>
  2. int myAtoiRec(int *str[],int n)
  3. {
  4. if(n==1)
  5. return *str-'0';
  6. return (10*myAtoiRec(str,n-1)+str[n-1]-'0');
  7. }
  8. int main(void) {
  9. int m, s[3]={123,124,125};
  10. m= myAtoiRec(s,3);
  11. printf("%d",m);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 4496KB
stdin
Standard input is empty
stdout
-113272