While I am trying to solve problem:Add two no’s, I initialized the array to arr[10^3] (somewhere I have seen this way in an answer in codechef) and I was wondering that its not working. I tried to calculate the sizeof the array and it shows 9 sizeof(arr)/sizeof(arr)) (64 bit OS and arr is initialized as unsigned int type).
What I tried:
Same code I compiled online and the results were same.
Initialized global as well as local but effects none.
Any idea what’s happening? What I am missing. Is this is the correct way or not??
P.S. Here the solution that failed: Solution