Record Detail

Accepted

/in/ex2.c: In function 'main':
/in/ex2.c:9:16: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'char * (*)[1]' [-Wformat=]
     scanf("%d %s",&m,&d);
                ^
In file included from /usr/include/string.h:630:0,
                 from /in/ex2.c:2:
/in/ex2.c:14:20: warning: passing argument 1 of '__builtin_strlen' from incompatible pointer type [-Wincompatible-pointer-types]
         if (strcmp(d,day[i-1]) == 0)
                    ^
/in/ex2.c:14:20: note: expected 'const char *' but argument is of type 'char **'
/in/ex2.c:14:20: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
         if (strcmp(d,day[i-1]) == 0)
                    ^
/in/ex2.c:14:20: note: expected 'const char *' but argument is of type 'char **'
/in/ex2.c:14:20: warning: passing argument 1 of '__builtin_strlen' from incompatible pointer type [-Wincompatible-pointer-types]
         if (strcmp(d,day[i-1]) == 0)
                    ^
/in/ex2.c:14:20: note: expected 'const char *' but argument is of type 'char **'
/in/ex2.c:14:20: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
         if (strcmp(d,day[i-1]) == 0)
                    ^
/in/ex2.c:14:20: note: expected 'const char *' but argument is of type 'char **'
/in/ex2.c:14:20: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
         if (strcmp(d,day[i-1]) == 0)
                    ^
/in/ex2.c:14:20: note: expected 'const char *' but argument is of type 'char **'
/in/ex2.c:14:20: warning: passing argument 1 of '__builtin_strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
         if (strcmp(d,day[i-1]) == 0)
                    ^
/in/ex2.c:14:20: note: expected 'const char *' but argument is of type 'char **'
/in/ex2.c:32:5: warning: 'k' may be used uninitialized in this function [-Wmaybe-uninitialized]
     for (int n = 1; n <= k; ++n) {
     ^~~
# Status Time Cost Memory Cost
#1 Accepted 0ms 336.0 KiB
#2 Accepted 0ms 252.0 KiB
#3 Accepted 0ms 204.0 KiB
#4 Accepted 0ms 332.0 KiB
#5 Accepted 0ms 204.0 KiB
#6 Accepted 0ms 252.0 KiB
#7 Accepted 0ms 332.0 KiB
#8 Accepted 0ms 204.0 KiB
#9 Accepted 1ms 256.0 KiB
#10 Accepted 0ms 256.0 KiB
#11 Accepted 1ms 372.0 KiB
#12 Accepted 1ms 256.0 KiB

Information

Submit By
Type
Submission
Homework
Assignment 5
Language
C
Submit At
2018-06-27 08:43:37
Judged At
2018-06-27 08:43:37
Judged By
Score
120
Total Time
11ms
Peak Memory
372.0 KiB