Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

array index 10^3 vs 1000

$
0
0

Hi Everyone,

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 9sizeof(arr)/sizeof(arr[0]))(64 bit OS and arr is initialized as unsigned int type). What I tried: 1) Same code I compiled online and the results were same. 2) 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??


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>