Borderou de evaluare (job #852360)
| Utilizator |
|
IP | ascuns |
|---|---|---|---|
| Problemă | Char (clasa a 7-a) | Compilator | c |
| Rundă | Concurs 04 | IQ Academy | clasa a 7-a | 2025-2026 | Status | evaluat |
| Dată | 7 feb. 2026 18:35:48 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:54:13: error: passing argument 1 of 'fprintf' from incompatible pointer type [-Wincompatible-pointer-types]
54 | fprintf("%d",sol1);
| ^~~~
| |
| 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:54:18: error: passing argument 2 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion]
54 | fprintf("%d",sol1);
| ^~~~
| |
| 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:24:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
24 | fscanf(fin,"%d",&n);
| ^~~~~~~~~~~~~~~~~~~
main.c:28:9: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
28 | fscanf(fin," %c",&ch[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~
main.c:42:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
42 | fscanf(fin,"%d",&q);
| ^~~~~~~~~~~~~~~~~~~
main.c:46:9: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
46 | fscanf(fin,"%d",&val);
| ^~~~~~~~~~~~~~~~~~~~~