Borderou de evaluare (job #796134)
Utilizator |
|
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:16:58 | 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:22:11: warning: passing argument 1 of 'fopen' from incompatible pointer type [-Wincompatible-pointer-types]
22 | 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:24:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
24 | if (H=n) ;
| ^
main.c:28:6: error: 'else' without a previous 'if'
28 | else
| ^~~~
main.c:40:8: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
40 | if(cifraa=H)
| ^~~~~~
main.c:45:19: warning: format '%d' expects argument of type 'int', but argument 3 has type 'int *' [-Wformat=]
45 | 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, i, n, Nn,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, i, n, Nn,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);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:22:3: warning: ignoring return value of 'fopen' declared with attribute 'warn_unused_result' [-Wunused-result]
22 | fopen ( fout, "concurs.out" "w") ;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:36:7: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
36 | scanf("%d", &a);