Borderou de evaluare (job #756054)

Utilizator avatar RobertSerb hacker ^_^ RobertSerb IP ascuns
Problemă Căutare1 (clasa a 5-a) Compilator c-32
Rundă Arhiva de probleme Status evaluat
Dată 19 ian. 2024 19:38:58 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:7:17: warning: too many arguments for format [-Wformat-extra-args] 7 | fscanf ( fin, "%d", &n, &m); | ^~~~ main.c:5:23: warning: unused variable 'cnt' [-Wunused-variable] 5 | int n, m, x, i, x2, cnt = 0; | ^~~ main.c:4:15: warning: unused variable 'fout' [-Wunused-variable] 4 | FILE *fin, *fout; | ^~~~ main.c: At top level: main.c:15:3: warning: data definition has no type or storage class 15 | fclose( fin ); | ^~~~~~ main.c:15:3: warning: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int] main.c:15:3: warning: parameter names (without types) in function declaration main.c:16:3: warning: data definition has no type or storage class 16 | fout = fopen("cautare1.out", "w"); | ^~~~ main.c:16:3: warning: type defaults to 'int' in declaration of 'fout' [-Wimplicit-int] main.c:16:10: warning: initialization of 'int' from 'FILE *' makes integer from pointer without a cast [-Wint-conversion] 16 | fout = fopen("cautare1.out", "w"); | ^~~~~ main.c:16:10: error: initializer element is not constant main.c:17:17: error: expected ')' before string constant 17 | fprintf( fout, "0"); | ^~~~ | ) main.c:18:17: error: expected ')' before string constant 18 | fprintf( fout, "0"); | ^~~~ | ) main.c:19:17: error: expected ')' before string constant 19 | fprintf( fout, "2"); | ^~~~ | ) main.c:20:17: error: expected ')' before string constant 20 | fprintf( fout, "1"); | ^~~~ | ) main.c:21:17: error: expected ')' before string constant 21 | fprintf( fout, "5"); | ^~~~ | ) main.c:22:17: error: expected ')' before string constant 22 | fprintf( fout, "1"); | ^~~~ | ) main.c:23:17: error: expected ')' before string constant 23 | fprintf( fout, "0");