Borderou de evaluare (job #823720)
| Utilizator |
|
IP | ascuns |
|---|---|---|---|
| Problemă | Cezark (clasa a 5-a) | Compilator | c-32 |
| Rundă | Arhiva de probleme | Status | evaluat |
| Dată | 12 mai 2025 20:27:45 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:16:45: warning: left-hand operand of comma expression has no effect [-Wunused-value]
16 | fputc (('a' + (c - 'a' + k) % 26, fout);
| ^
main.c:16:52: error: expected ')' before ';' token
16 | fputc (('a' + (c - 'a' + k) % 26, fout);
| ~ ^
| )
main.c:16:45: error: passing argument 1 of 'fputc' makes integer from pointer without a cast [-Wint-conversion]
16 | fputc (('a' + (c - 'a' + k) % 26, fout);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| |
| FILE *
In file included from main.c:1:
/usr/include/stdio.h:611:23: note: expected 'int' but argument is of type 'FILE *'
611 | extern int fputc (int __c, FILE *__stream) __nonnull ((2));
| ~~~~^~~
main.c:16:13: error: too few arguments to function 'fputc'
16 | fputc (('a' + (c - 'a' + k) % 26, fout);
| ^~~~~
/usr/include/stdio.h:611:12: note: declared here
611 | extern int fputc (int __c, FILE *__stream) __nonnull ((2));
| ^~~~~
main.c:16:53: error: expected ';' before '}' token
16 | fputc (('a' + (c - 'a' + k) % 26, fout);
| ^
| ;
17 | }
| ~
main.c:9:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
9 | fscanf (fin, "%d", &k);
| ^~~~~~~~~~~~~~~~~~~~~~