/in/foo.c: In function 'main':
/in/foo.c:18:10: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
int *a1=malloc(sizeof(int)*2500);
^~~~~~
/in/foo.c:18:10: warning: incompatible implicit declaration of built-in function 'malloc'
/in/foo.c:18:10: note: include '<stdlib.h>' or provide a declaration of 'malloc'
/in/foo.c:27:11: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
scanf("%d",a1[i]);
^
/in/foo.c:28:6: error: 'i' undeclared (first use in this function)
for(i=0;i<n2;i++)
^
/in/foo.c:28:6: note: each undeclared identifier is reported only once for each function it appears in