hindeks.c: In function 'main':
hindeks.c:21:47: warning: passing argument 5 of 'bsearch' from incompatible pointer type [-Wincompatible-pointer-types]
int* ans = bsearch(&j, v, MAXN, sizeof(int), cmp);
^
In file included from /usr/include/stdlib.h:759:0,
from hindeks.c:2:
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:20:1: note: expected '__compar_fn_t {aka int (*)(const void *, const void *)}' but argument is of type 'int (*)(const int *, const int *)'
bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
^
hindeks.c:22:9: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
printf("%d\n", ans - v);
^
hindeks.c:19:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^
hindeks.c:20:29: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
for(int i = 0; i < n; i++) scanf("%d", &score[i]);
^