Hi All,
I have been reading everywhere that "all arrays consist of contiguous memory
locations."
Here, what does contiguous mean? Does it mean that it is possible that the
elements
of the array need not be compulsorily in the adjacent memory locations?
i.e., suppose I declare an array of integers in the following way, and assuming
int occupies 2 bytes,
int a[5];
then is it possible that the memory allocation can also be in the following way:
index 0 1 2 3 4
address 1000 1002 1004 1050 1052
or should it be compulsorily continuous
index 0 1 2 3 4
address 1000 1002 1004 1006 1008
And if it should be compulsorily continuous, then why is it given everywhere
that
array elements are stored in contiguous memory locations.
Can anyone please help me understand this. Thanks a lot.
Cheers!
Ana
Connect more, do more and share more with Yahoo! India Mail. Learn more.
http://in.overview.mail.yahoo.com/
[Non-text portions of this message have been removed]