/in/foo.cc: In function 'int main()':
/in/foo.cc:10:15: warning: iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations]
cout<<a[i]<<' ';
^~~
/in/foo.cc:9:15: note: within this loop
for(int i=1;i<=3;i++)
~^~~
/in/foo.cc:8:6: warning: array subscript is above array bounds [-Warray-bounds]
sort(a+1,a+3+1,greater<int>());
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:8:6: warning: array subscript is above array bounds [-Warray-bounds]
/in/foo.cc:8:6: warning: array subscript is above array bounds [-Warray-bounds]