Record Detail

Compile Error

/in/ex1.c: In function 'main':
/in/ex1.c:10:13: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char **' [-Werror=format=]
     scanf("%s",name);
            ~^  ~~~~
/in/ex1.c:11:33: error: passing argument 1 of 'strlen' from incompatible pointer type [-Werror=incompatible-pointer-types]
     for(int i=0; i<=(int)strlen(name)-1;i++){
                                 ^~~~
In file included from /in/ex1.c:2:0:
/usr/include/string.h:384:15: note: expected 'const char *' but argument is of type 'char **'
 extern size_t strlen (const char *__s)
               ^~~~~~
/in/ex1.c:18:19: error: comparison between pointer and integer [-Werror]
         if(temp[i]>max){
                   ^
/in/ex1.c:19:16: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
             max=temp[i];
                ^
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Problem
Mid2 Ex1
Homework
Midterm Exam 2
Language
C
Submit At
2022-07-07 15:41:38
Judged At
2022-07-08 16:06:06
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes