Borderou de evaluare (job #791590)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Hobbit (clasa a 5-a) | Compilator | c-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 27 oct. 2024 20:49:49 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:7:29: error: expected ')' before ';' token
7 | fin=fopen("hobbit.in", "r";);
| ~ ^
| )
main.c:8:10: warning: passing argument 1 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types]
8 | fscanf("%d%d", &a,&b);
| ^~~~~~
| |
| char *
In file included from main.c:1:
/usr/include/stdio.h:422:37: note: expected 'FILE * restrict' but argument is of type 'char *'
422 | extern int fscanf (FILE *__restrict __stream,
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:8:18: warning: passing argument 2 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types]
8 | fscanf("%d%d", &a,&b);
| ^~
| |
| int *
/usr/include/stdio.h:423:43: note: expected 'const char * restrict' but argument is of type 'int *'
423 | const char *__restrict __format, ...) __wur __nonnull ((1));
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:6:23: warning: unused variable 'r' [-Wunused-variable]
6 | int a,b,x,y,ca,cb,k,r,cx,cy;
| ^
main.c:6:21: warning: unused variable 'k' [-Wunused-variable]
6 | int a,b,x,y,ca,cb,k,r,cx,cy;
| ^
main.c:8:3: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
8 | fscanf("%d%d", &a,&b);
| ^~~~~~~~~~~~~~~~~~~~~