foo.c: In function 'main':
foo.c:7:9: error: too few arguments to function 'fgets'
7 | fgets(s1);
| ^~~~~
In file included from foo.c:1:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:592:14: note: declared here
592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
| ^~~~~
foo.c:8:9: error: too few arguments to function 'fgets'
8 | fgets(s2);
| ^~~~~
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:592:14: note: declared here
592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
| ^~~~~
foo.c:9:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
9 | printf("%d %d", strlen(s1), strlen(s2));
| ~^ ~~~~~~~~~~
| | |
| int size_t {aka long unsigned int}
| %ld
foo.c:9:21: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
9 | printf("%d %d", strlen(s1), strlen(s2));
| ~^ ~~~~~~~~~~
| | |
| int size_t {aka long unsigned int}
| %ld
[Hydro](https://hydro.ac)提供评测服务