Borderou de evaluare (job #812566)

Utilizator avatar ArghirBianca Arghir Bianca-Elena ArghirBianca IP ascuns
Problemă Speciale (clasa a 5-a) Compilator c-32
Rundă Concurs 05 | IQ Academy | clasa a 5-a Status evaluat
Dată 4 mar. 2025 18:53:40 Scor 0

Raport evaluator

Eroare de compilare: main.c: In function 'main': main.c:13:14: error: passing argument 1 of 'fprintf' from incompatible pointer type [-Wincompatible-pointer-types] 13 | fprintf( "b=%d\n", b ); | ^~~~~~~~ | | | char * In file included from /usr/include/stdio.h:970, from main.c:1: /usr/include/bits/stdio2.h:109:27: note: expected 'FILE *' but argument is of type 'char *' 109 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) | ~~~~~~~~~~~~~~~~~^~~~~~~~ main.c:13:24: error: passing argument 2 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion] 13 | fprintf( "b=%d\n", b ); | ^ | | | int /usr/include/bits/stdio2.h:109:60: note: expected 'const char *' but argument is of type 'int' 109 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ main.c:9:34: warning: unused variable 'nrs' [-Wunused-variable] 9 | int a, k, n, b, p, ic, i, s, nrs = 0; | ^~~ main.c:9:31: warning: unused variable 's' [-Wunused-variable] 9 | int a, k, n, b, p, ic, i, s, nrs = 0; | ^ main.c:9:28: warning: unused variable 'i' [-Wunused-variable] 9 | int a, k, n, b, p, ic, i, s, nrs = 0; | ^ main.c:9:24: warning: unused variable 'ic' [-Wunused-variable] 9 | int a, k, n, b, p, ic, i, s, nrs = 0; | ^~ main.c: At top level: main.c:37:1: warning: data definition has no type or storage class 37 | fclose( fin ); | ^~~~~~ main.c:37:1: error: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int] main.c:37:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] main.c:38:1: warning: data definition has no type or storage class 38 | fclose( fout ); | ^~~~~~ main.c:38:1: error: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int] main.c:38:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] main.c:39:1: error: expected identifier or '(' before 'return' 39 | return 0; | ^~~~~~ main.c:40:1: error: expected identifier or '(' before '}' token 40 | } | ^ main.c: In function 'main': main.c:12:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]