prog.c: In function ‘main’:
prog.c:31:2: warning: implicit declaration of function ‘scanf_s’; did you mean ‘scanf’? [-Wimplicit-function-declaration]
scanf_s("%d", &n);
^~~~~~~
scanf
prog.c:32:19: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
int* arr = (int*)malloc(sizeof(int)*5000);
^~~~~~
prog.c:32:19: warning: incompatible implicit declaration of built-in function ‘malloc’
prog.c:32:19: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
prog.c:2:1:
+#include <stdlib.h>
void swap(int* arr, int x, int y) {
prog.c:32:19:
int* arr = (int*)malloc(sizeof(int)*5000);
^~~~~~
prog.c:37:4: warning: implicit declaration of function ‘realloc’ [-Wimplicit-function-declaration]
realloc(arr, sizeof(int) * 5000 * cnt);
^~~~~~~
prog.c:37:4: warning: incompatible implicit declaration of built-in function ‘realloc’
prog.c:37:4: note: include ‘<stdlib.h>’ or provide a declaration of ‘realloc’
/usr/bin/ld: /home/Jj2PIY/ccjVfg2f.o: in function `main':
prog.c:(.text.startup+0x2f): undefined reference to `scanf_s'
/usr/bin/ld: prog.c:(.text.startup+0x7b): undefined reference to `scanf_s'
collect2: error: ld returned 1 exit status