foo.c: In function 'main':
foo.c:12:17: warning: array subscript <unknown> is outside array bounds of 'int[<U 2d0>]' [-Warray-bounds]
12 | a=number[k];
| ~~~~~~^~~
foo.c:7:13: note: while referencing 'number.7'
7 | int number[n];
| ^~~~~~
foo.c:15:15: warning: array subscript 1 is outside array bounds of 'int[<U 2d0>]' [-Warray-bounds]
15 | number[1]=a;
| ~~~~~~^~~
foo.c:7:13: note: while referencing 'number.7'
7 | int number[n];
| ^~~~~~
foo.c:16:32: warning: array subscript i is outside array bounds of 'int[<U 2d0>]' [-Warray-bounds]
16 | for(int i=1;i<n+1;i++){printf("%d ",number[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~
foo.c:7:13: note: while referencing 'number.7'
7 | int number[n];
| ^~~~~~
foo.c:13:46: warning: array subscript <unknown> is outside array bounds of 'int[<U 2d0>]' [-Warray-bounds]
13 | for(int i=k;i>1;i--){number[i]=number[i-1];
| ~~~~~~^~~~~
foo.c:7:13: note: while referencing 'number.7'
7 | int number[n];
| ^~~~~~
foo.c:13:36: warning: array subscript i is outside array bounds of 'int[<U 2d0>]' [-Warray-bounds]
13 | for(int i=k;i>1;i--){number[i]=number[i-1];
| ~~~~~~^~~
foo.c:7:13: note: while referencing 'number.7'
7 | int number[n];
| ^~~~~~
foo.c:10:32: warning: array subscript i is outside array bounds of 'int[<U 2d0>]' [-Warray-bounds]
10 | for(int i=1;i<n+1;i++){scanf("%d",&number[i]);
| ^~~~~~~~~~~~~~~~~~~~~~
foo.c:7:13: note: while referencing 'number.7'
7 | int number[n];
| ^~~~~~
foo.c:13:39: warning: '__builtin_memmove' offset [0, 3] is out of the bounds [0, 0] of object 'number.7' with type 'unsigned char[0]' [-Warray-bounds]
13 | for(int i=k;i>1;i--){number[i]=number[i-1];
| ~~~~~~~~~^~~~~~~~~~~~
foo.c:7:13: note: 'number.7' declared here
7 | int number[n];
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务