Borderou de evaluare (job #791667)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Centru Prim (clasa a 5-a) | Compilator | c-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 28 oct. 2024 19:41:15 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:26:17: warning: passing argument 1 of 'fprintf' from incompatible pointer type [-Wincompatible-pointer-types]
26 | fprintf("1");
| ^~~
| |
| char *
In file included from /usr/include/stdio.h:980,
from main.c:1:
/usr/include/bits/stdio2.h:77:27: note: expected 'FILE * restrict' but argument is of type 'char *'
77 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:26:9: error: too few arguments to function 'fprintf'
26 | fprintf("1");
| ^~~~~~~
/usr/include/bits/stdio2.h:77:1: note: declared here
77 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
| ^~~~~~~
main.c:27:5: error: expected '}' before 'else'
27 | else
| ^~~~
main.c:28:17: warning: passing argument 1 of 'fprintf' from incompatible pointer type [-Wincompatible-pointer-types]
28 | fprintf("0")
| ^~~
| |
| char *
/usr/include/bits/stdio2.h:77:27: note: expected 'FILE * restrict' but argument is of type 'char *'
77 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:28:9: error: too few arguments to function 'fprintf'
28 | fprintf("0")
| ^~~~~~~
/usr/include/bits/stdio2.h:77:1: note: declared here
77 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
| ^~~~~~~
main.c:28:21: error: expected ';' before '}' token
28 | fprintf("0")
| ^
| ;
29 | }
| ~
main.c:5:17: warning: variable 'fout' set but not used [-Wunused-but-set-variable]
5 | FILE *fin, *fout;
| ^~~~
main.c: At top level:
main.c:30:5: warning: data definition has no type or storage class
30 | fclose ( fout );
| ^~~~~~
main.c:30:5: warning: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int]
main.c:30:5: warning: parameter names (without types) in function declaration
main.c:31:5: error: expected identifier or '(' before 'return'