/in/foo.c: In function 'main':
/in/foo.c:17:3: warning: iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations]
printf("%d ",a[i]);
^~~~~~~~~~~~~~~~~~
/in/foo.c:16:2: note: within this loop
for(i=0;i<3;i++)
^~~
/in/foo.c:9:13: warning: iteration 1 invokes undefined behavior [-Waggressive-loop-optimizations]
if(a[k]>a[k+1])
~^~~~~
/in/foo.c:8:3: note: within this loop
for(k=0;k<2;k++)
^~~
/in/foo.c:9:13: warning: array subscript is above array bounds [-Warray-bounds]
if(a[k]>a[k+1])
~^~~~~
/in/foo.c:13:6: warning: array subscript is above array bounds [-Warray-bounds]
a[k+1]=tmp;
~^~~~~