/in/foo.cc: In function 'int count(int, int)':
/in/foo.cc:27:13: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
return ans-i;
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:27:13: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
return ans-i;
^
/in/foo.cc:20:14: note: 'ans' was declared here
int l=i,r=n,ans,mid;
^~~
/in/foo.cc:48:9: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
printf("%d\n",ans);
~~~~~~^~~~~~~~~~~~