/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:9: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:13: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=]
printf("%ld ",a[i]);
^
/in/foo.c:12:12: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=]
printf("%ld",a[0]);
^
/in/foo.c:13:2: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
free(a);
^~~~
/in/foo.c:13:2: warning: incompatible implicit declaration of built-in function 'free'
/in/foo.c:13:2: note: include '<stdlib.h>' or provide a declaration of 'free'