/in/foo.c: In function 'main':
/in/foo.c:6:17: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
int *a = (int*)malloc(n * sizeof(int));
^~~~~~
/in/foo.c:6:17: warning: incompatible implicit declaration of built-in function 'malloc'
/in/foo.c:6:17: note: include '<stdlib.h>' or provide a declaration of 'malloc'
/in/foo.c:43:2: warning: implicit declaration of function 'system' [-Wimplicit-function-declaration]
system("pause");
^~~~~~
/in/foo.c:34:2: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
for (j = 2; j < p;) {
^~~