Borderou de evaluare (job #791282)

Utilizator avatar PKarinaa_ Pata Karina PKarinaa_ IP ascuns
Problemă Centru Prim (clasa a 5-a) Compilator c-32
Rundă Tema 11 Clasa a 5-a Status evaluat
Dată 25 oct. 2024 18:58:32 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:15:11: error: too few arguments to function 'fopen' 15 | fin = fopen ("centruprim.in" "r") ; | ^~~~~ In file included from main.c:1: /usr/include/stdio.h:264:14: note: declared here 264 | extern FILE *fopen (const char *__restrict __filename, | ^~~~~ main.c:29:19: error: too few arguments to function 'fopen' 29 | fout= fopen ("centruprim.out" "w") ; | ^~~~~ /usr/include/stdio.h:264:14: note: declared here 264 | extern FILE *fopen (const char *__restrict __filename, | ^~~~~ main.c:30:17: warning: passing argument 1 of 'fprintf' from incompatible pointer type [-Wincompatible-pointer-types] 30 | fprintf("1 \n"); | ^~~~~~ | | | char * In file included from /usr/include/stdio.h:980: /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:30:9: error: too few arguments to function 'fprintf' 30 | fprintf("1 \n"); | ^~~~~~~ /usr/include/bits/stdio2.h:77:1: note: declared here 77 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) | ^~~~~~~ main.c:32:17: warning: passing argument 1 of 'fprintf' from incompatible pointer type [-Wincompatible-pointer-types] 32 | fprintf("0 \n"); | ^~~~~~ | | | 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:32:9: error: too few arguments to function 'fprintf' 32 | fprintf("0 \n"); | ^~~~~~~ /usr/include/bits/stdio2.h:77:1: note: declared here 77 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) | ^~~~~~~ main.c:17:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result] 17 | fscanf( fin, "%d", &n); | ^~~~~~~~~~~~~~~~~~~~~~