xorsum.cpp: In function 'int main()':
xorsum.cpp:8:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("tc.txt","r",stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~
xorsum.cpp:9:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("out.txt","w",stdout);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
xorsum.cpp:10:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
xorsum.cpp:11:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1;i<=n;i++) scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~