foo.cc: In function ‘int main()’:
foo.cc:16:21: warning: ‘xmax’ may be used uninitialized [-Wmaybe-uninitialized]
16 | cout<<xmax<<" "<<maxm<<endl<<minm<<" "<<minn;
| ^~~
foo.cc:4:47: note: ‘xmax’ was declared here
4 | int n[1000],maxm=INT_MIN,minn=INT_MAX,xmax,minm;
| ^~~~
foo.cc:16:44: warning: ‘minm’ may be used uninitialized [-Wmaybe-uninitialized]
16 | cout<<xmax<<" "<<maxm<<endl<<minm<<" "<<minn;
| ^~~
foo.cc:4:52: note: ‘minm’ was declared here
4 | int n[1000],maxm=INT_MIN,minn=INT_MAX,xmax,minm;
| ^~~~