Borderou de evaluare (job #747061)

Utilizator avatar RaresManolescu Rares Manolescu RaresManolescu IP ascuns
Problemă Îngerași (clasa a 5-a) Compilator c-32
Rundă Concurs 02 | IQ Academy | clasa a 5-a, seara Status evaluat
Dată 24 nov. 2023 10:42:16 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:9:11: warning: passing argument 1 of 'scanf' from incompatible pointer type [-Wincompatible-pointer-types] 9 | scanf(fin,"%d",&N); | ^~~ | | | FILE * In file included from main.c:1: /usr/include/stdio.h:421:42: note: expected 'const char * restrict' but argument is of type 'FILE *' 421 | extern int scanf (const char *__restrict __format, ...) __wur; | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:11:10: warning: statement with no effect [-Wunused-value] 11 | for(i<=N;i++;){ | ~^~~ main.c:14:15: warning: passing argument 1 of 'scanf' from incompatible pointer type [-Wincompatible-pointer-types] 14 | scanf(fin,"%d",&x); | ^~~ | | | FILE * /usr/include/stdio.h:421:42: note: expected 'const char * restrict' but argument is of type 'FILE *' 421 | extern int scanf (const char *__restrict __format, ...) __wur; | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:19:10: warning: statement with no effect [-Wunused-value] 19 | for(i<=N;i++){ | ~^~~ main.c:19:17: error: expected ';' before ')' token 19 | for(i<=N;i++){ | ^ | ; main.c:22:13: warning: passing argument 1 of 'scanf' from incompatible pointer type [-Wincompatible-pointer-types] 22 | scanf(fin,"%d",&j); | ^~~ | | | FILE * /usr/include/stdio.h:421:42: note: expected 'const char * restrict' but argument is of type 'FILE *' 421 | extern int scanf (const char *__restrict __format, ...) __wur; | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:34:12: warning: passing argument 1 of 'printf' from incompatible pointer type [-Wincompatible-pointer-types] 34 | printf(fout,H); | ^~~~ | | | FILE * In file included from /usr/include/stdio.h:906: /usr/include/bits/stdio2.h:84:32: note: expected 'const char * restrict' but argument is of type 'FILE *' 84 | printf (const char *__restrict __fmt, ...) | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ main.c:7:15: warning: unused variable 'm' [-Wunused-variable] 7 | int N,H,i,m,x=0,z,j=0,n; | ^ main.c:9:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result] 9 | scanf(fin,"%d",&N);