prog.m: In function ‘main’:
prog.m:9:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < N; i++)
^~~
prog.m:9:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
prog.m:10:19: error: subscripted value is neither array nor pointer nor vector
scanf("%d", &mass[i]);
^
prog.m:14:22: warning: passing argument 2 of ‘binarysearch’ makes pointer from integer without a cast [-Wint-conversion]
k = binarysearch(S, mass, N);
^~~~
prog.m:2:5: note: expected ‘int *’ but argument is of type ‘int’
int binarysearch(int a, int mass[], int n);
^~~~~~~~~~~~