foo.c: In function 'main':
foo.c:6:21: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
6 | int *a = (int *)malloc(sizeof(int) * n);
| ^~~~~~
foo.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
1 | #include <stdio.h>
+++ |+#include <stdlib.h>
2 | int main()
foo.c:6:21: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
6 | int *a = (int *)malloc(sizeof(int) * n);
| ^~~~~~
foo.c:6:21: note: include '<stdlib.h>' or provide a declaration of 'malloc'
foo.c:35:17: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
35 | free(e);
| ^~~~
foo.c:35:17: note: include '<stdlib.h>' or provide a declaration of 'free'
foo.c:35:17: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch]
foo.c:35:17: note: include '<stdlib.h>' or provide a declaration of 'free'
foo.c:41:5: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch]
41 | free(a);
| ^~~~
foo.c:41:5: note: include '<stdlib.h>' or provide a declaration of 'free'
[Hydro](https://hydro.ac)提供评测服务