foo.c: In function 'main':
foo.c:39:30: warning: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
39 | int length1 = strlen(a);
| ^
| |
| int *
In file included from foo.c:2:
/nix/store/rffag931pvbdiabwwa539wnwg1piqpx0-glibc-2.35-163-dev/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int *'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
foo.c:40:30: warning: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
40 | int length2 = strlen(b);
| ^
| |
| int *
In file included from foo.c:2:
/nix/store/rffag931pvbdiabwwa539wnwg1piqpx0-glibc-2.35-163-dev/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int *'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
[Hydro](https://hydro.ac)提供评测服务