Record Detail

Compile Error

/in/l6.c: In function 'main':
/in/l6.c:18:9: error: ISO C forbids nested functions [-Werror=pedantic]
         char str[100]
         ^~~~
/in/l6.c:19:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fscanf'
         fscanf("%s",str);
         ^~~~~~
/in/l6.c:19:21: error: 'str' undeclared (first use in this function)
         fscanf("%s",str);
                     ^~~
/in/l6.c:19:21: note: each undeclared identifier is reported only once for each function it appears in
/in/l6.c:19:16: error: passing argument 1 of 'fscanf' from incompatible pointer type [-Werror=incompatible-pointer-types]
         fscanf("%s",str);
                ^~~~
In file included from /usr/include/features.h:364:0,
                 from /usr/include/stdio.h:27,
                 from /in/l6.c:1:
/usr/include/stdio.h:445:12: note: expected 'FILE * restrict {aka struct _IO_FILE * restrict}' but argument is of type 'char *'
 extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
            ^
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab 6
Language
C
Submit At
2018-07-10 00:17:16
Judged At
2018-07-10 00:17:16
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes