foo.c: In function 'main':
foo.c:13:9: warning: 'fgets' writing 10001 bytes into a region of size 10000 overflows the destination [-Wstringop-overflow=]
13 | fgets(s1,10001,stdin);
| ^~~~~~~~~~~~~~~~~~~~~
foo.c:11:14: note: destination object 's1' of size 10000
11 | char s1[10000];
| ^~
In file included from foo.c:1:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:592:14: note: in a call to function 'fgets' declared with attribute 'access (write_only, 1, 2)'
592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
| ^~~~~
foo.c:14:9: warning: 'fgets' writing 10001 bytes into a region of size 10000 overflows the destination [-Wstringop-overflow=]
14 | fgets(s2,10001,stdin);
| ^~~~~~~~~~~~~~~~~~~~~
foo.c:12:14: note: destination object 's2' of size 10000
12 | char s2[10000];
| ^~
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:592:14: note: in a call to function 'fgets' declared with attribute 'access (write_only, 1, 2)'
592 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
| ^~~~~
[Hydro](https://hydro.ac)提供评测服务