Borderou de evaluare (job #648051)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Monotonă (clasa a 5-a) | Compilator | c-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 21 apr. 2022 09:18:59 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:8:5: error: 'fin' undeclared (first use in this function)
8 | fin=fopen( "monotona.in", "r" );
| ^~~
main.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:16: warning: passing argument 1 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types]
12 | fscanf("%d",&x[i]);
| ^~~~
| |
| char *
In file included from main.c:1:
/usr/include/stdio.h:409:37: note: expected 'FILE * restrict' but argument is of type 'char *'
409 | extern int fscanf (FILE *__restrict __stream,
| ~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:12:21: warning: passing argument 2 of 'fscanf' from incompatible pointer type [-Wincompatible-pointer-types]
12 | fscanf("%d",&x[i]);
| ^~~~~
| |
| int *
In file included from main.c:1:
/usr/include/stdio.h:410:43: note: expected 'const char * restrict' but argument is of type 'int *'
410 | const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:11:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
11 | for(int i = 0 ; i < n ; ++ i)
| ^~~
main.c:13:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
13 | _Bool ordonat;
| ^~~~~
main.c:14:5: warning: the address of 'free' will always evaluate as 'true' [-Waddress]
14 | ordonat = free;
| ^~~~~~~
main.c:17:13: warning: the address of 'fclose' will always evaluate as 'true' [-Waddress]
17 | ordonat = fclose;
| ^~~~~~~
main.c:19:18: error: 'fout' undeclared (first use in this function)
19 | fprintf( fout,"Da" );
| ^~~~
main.c:9:8: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
9 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
main.c:12:9: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
12 | fscanf("%d",&x[i]);
| ^~~~~~~~~~~~~~~~~~