Search Results

Search found 1 results on 1 pages for 'somasekhar'.

Page 1/1 | 1 

  • passing argument 1 of 'atoi' makes pointer from integer without a cast....can any body help me..

    - by somasekhar
    #include<stdio.h> #include<string.h> #include<stdlib.h> int main(){ int n; int a,b,ans[10000]; char *c,*d,*e; int i = 0; c = (char*)(malloc(20 * sizeof(char))); d = (char*)(malloc(20 * sizeof(char))); scanf("%d",&n); while(i < n){ scanf("%d",&a); scanf("%d",&b); itoa(a,c,10); itoa(b,d,10); a = atoi(strrev(c)) + atoi(strrev(d)); itoa(a,c,10); e = c; while(*e == '0')e++; ans[i] = atoi(strrev(e)); i++; } i = 0; while(i < n){ printf("%d\n",ans[i]); i++; } }

    Read the article

1