Borderou de evaluare (job #652402)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Case (clasa a 5-a) | Compilator | c-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 8 iun. 2022 15:55:35 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:29:16: error: unknown type name 'S'
29 | fclose(in);S
| ^
main.c:30:5: error: conflicting types for 'out'; have 'int'
30 | out = fopen("case.out" ,"w");
| ^~~
main.c:6:16: note: previous declaration of 'out' with type 'FILE *'
6 | FILE *in, *out;
| ^~~
main.c:30:11: warning: initialization of 'int' from 'FILE *' makes integer from pointer without a cast [-Wint-conversion]
30 | out = fopen("case.out" ,"w");
| ^~~~~
main.c:31:13: warning: passing argument 1 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion]
31 | fprintf(out, "%hd\n%hd\n%hd\n%hd\n%hd\n%hd\n", g1, g2, g3, b, f, c);
| ^~~
| |
| int
In file included from /usr/include/stdio.h:888,
from main.c:1:
/usr/include/bits/stdio2.h:103:27: note: expected 'FILE * restrict' but argument is of type 'int'
103 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:32:12: warning: passing argument 1 of 'fclose' makes pointer from integer without a cast [-Wint-conversion]
32 | fclose(out);
| ^~~
| |
| int
In file included from main.c:1:
/usr/include/stdio.h:172:26: note: expected 'FILE *' but argument is of type 'int'
172 | extern int fclose (FILE *__stream);
| ~~~~~~^~~~~~~~
main.c:10:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
10 | fscanf(in, "%hd" ,&n);
| ^~~~~~~~~~~~~~~~~~~~~
main.c:13:7: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | fscanf(in, "%hd" ,&nr);
| ^~~~~~~~~~~~~~~~~~~~~~