Borderou de evaluare (job #796129)

Utilizator avatar PKarinaa_ Pata Karina PKarinaa_ IP ascuns
Problemă Concurs (clasa a 5-a) Compilator c-32
Rundă Concurs 01 | IQ Academy | clasa a 5-a Status evaluat
Dată 19 nov. 2024 19:09:36 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:7:10: warning: passing argument 1 of 'fopen' from incompatible pointer type [-Wincompatible-pointer-types] 7 | fopen (fin, "concurs.in", "r") ; | ^~~ | | | FILE * In file included from main.c:1: /usr/include/stdio.h:264:44: note: expected 'const char * restrict' but argument is of type 'FILE *' 264 | extern FILE *fopen (const char *__restrict __filename, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ main.c:7:3: error: too many arguments to function 'fopen' 7 | fopen (fin, "concurs.in", "r") ; | ^~~~~ /usr/include/stdio.h:264:14: note: declared here 264 | extern FILE *fopen (const char *__restrict __filename, | ^~~~~ main.c:21:11: warning: passing argument 1 of 'fopen' from incompatible pointer type [-Wincompatible-pointer-types] 21 | fopen ( fout, "concurs.out" "w") ; | ^~~~ | | | FILE * /usr/include/stdio.h:264:44: note: expected 'const char * restrict' but argument is of type 'FILE *' 264 | extern FILE *fopen (const char *__restrict __filename, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ main.c:23:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 23 | if (H=n) ; | ^ main.c:25:3: error: 'else' without a previous 'if' 25 | else ; | ^~~~ main.c:37:8: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 37 | if(cifraa=H) | ^~~~~~ main.c:42:19: warning: format '%d' expects argument of type 'int', but argument 3 has type 'int *' [-Wformat=] 42 | fprintf(fout, "%d", &ct); | ~^ ~~~ | | | | int int * | %n main.c:6:17: warning: variable 'c' set but not used [-Wunused-but-set-variable] 6 | int a, ca, b, c, H, cH, n, Nn,i,cifraa,ct; | ^ main.c:6:14: warning: variable 'b' set but not used [-Wunused-but-set-variable] 6 | int a, ca, b, c, H, cH, n, Nn,i,cifraa,ct; | ^ main.c:7:3: warning: ignoring return value of 'fopen' declared with attribute 'warn_unused_result' [-Wunused-result] 7 | fopen (fin, "concurs.in", "r") ; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.c:8:3: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result] 8 | fscanf( fin, "%d%d", &Nn,&n);