foo.cc: In function ‘int main()’:
foo.cc:17:12: warning: array subscript 1 is above array bounds of ‘int [1]’ [-Warray-bounds=]
17 | q[1]=1;
| ~~~^
foo.cc:15:13: note: while referencing ‘q’
15 | int q[1];
| ^
foo.cc:26:15: warning: array subscript 1 is above array bounds of ‘int [1]’ [-Warray-bounds=]
26 | printf("%d",q[1]);
| ~~~~~~^~~~~~~~~~~
foo.cc:15:13: note: while referencing ‘q’
15 | int q[1];
| ^
foo.cc:23:28: warning: array subscript 1 is above array bounds of ‘int [1]’ [-Warray-bounds=]
23 | q[1]=k+1;
| ~~~^
foo.cc:15:13: note: while referencing ‘q’
15 | int q[1];
| ^