/in/foo.c: In function 'main':
/in/foo.c:7:15: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
int *a=(int*)malloc(sizeof(int)*n);
^~~~~~
/in/foo.c:7:15: warning: incompatible implicit declaration of built-in function 'malloc'
/in/foo.c:7:15: note: include '<stdlib.h>' or provide a declaration of 'malloc'
/in/foo.c:10:12: warning: format '%ld' expects argument of type 'long int *', but argument 2 has type 'int *' [-Wformat=]
scanf("%ld",&a[i]);
^
/in/foo.c:11:22: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=]
if(i>=1) printf("%ld ",a[i]);
^
/in/foo.c:13:12: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=]
printf("%ld",a[0]);
^
/in/foo.c:14:2: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
free(a);
^~~~
/in/foo.c:14:2: warning: incompatible implicit declaration of built-in function 'free'
/in/foo.c:14:2: note: include '<stdlib.h>' or provide a declaration of 'free'