Record Detail

Compile Error

/in/ex5.c: In function 'main':
/in/ex5.c:13:13: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[100]' [-Werror=format=]
     scanf("%s",&sentence);
            ~^  ~~~~~~~~~
/in/ex5.c:14:5: error: too few arguments to function 'fgets'
     fgets(sentence);
     ^~~~~
In file included from /in/ex5.c:7:0:
/usr/include/stdio.h:564:14: note: declared here
 extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
              ^~~~~
/in/ex5.c:15:5: error: 'len' undeclared (first use in this function)
     len= average(sentence, &num);
     ^~~
/in/ex5.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Homework 4
Language
C
Submit At
2022-06-25 19:30:58
Judged At
2022-06-29 06:52:27
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes