Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Array intialisation and printing

$
0
0
hi
void main()
{
int arr[10];
arr[10]=25;
printf("%d",arr[10]);
}

in the above code the array size is 10.and array could store the values in this order
arr[0],arr[1],arr[3],....arr[9];but when i enter the value for the 11th element in the array there is no space for the allocation of the 11th element.. but i stores the 11th element and then it also prints the 11th element ..expalin me..

Viewing all articles
Browse latest Browse all 51036

Trending Articles



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