Borderou de evaluare (job #1832244)

Utilizator sLKzRoman George sLKz Data 19 decembrie 2016 17:41:31
Problema Cautare binara Status done
Runda Arhiva educationala Compilator c | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.c: In function ‘main’: user.c:71:9: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘long int *’ [-Wformat=] fscanf(file_r, "%d", &arr[i]); ^ user.c:81:13: warning: passing argument 1 of ‘binary_search_0’ from incompatible pointer type [enabled by default] fprintf(file_w, "%d\n", binary_search_0(arr, n, number)); ^ user.c:3:5: note: expected ‘int *’ but argument is of type ‘long int *’ int binary_search_0(int* arr, int size, int target) { ^ user.c:83:13: warning: passing argument 1 of ‘binary_search_1’ from incompatible pointer type [enabled by default] fprintf(file_w, "%d\n", binary_search_1(arr, n, number)); ^ user.c:24:5: note: expected ‘int *’ but argument is of type ‘long int *’ int binary_search_1(int* arr, int size, int target) { ^ user.c:85:13: warning: passing argument 1 of ‘binary_search_2’ from incompatible pointer type [enabled by default] fprintf(file_w, "%d\n", binary_search_2(arr, n, number)); ^ user.c:43:5: note: expected ‘int *’ but argument is of type ‘long int *’ int binary_search_2(int* arr, int size, int target) { ^ user.c:89:11: error: request for member ‘close’ in something not a structure or union file_r.close(); ^ user.c:90:11: error: request for member ‘close’ in something not a structure or union file_w.close(); ^ user.c:69:11: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(file_r, "%d", &n); ^ user.c:71:15: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(file_r, "%d", &arr[i]); ^ user.c:75:11: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(file_r, "%d", &m); ^ user.c:78:15: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(file_r, "%d %d", &question, &number); ^

Ceva nu functioneaza?