Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!fluke!ssc-vax!dmg From: dmg@ssc-vax.UUCP (David Geary) Newsgroups: comp.lang.c Subject: Contiguous Arrays Message-ID: <2508@ssc-vax.UUCP> Date: 20 Feb 89 17:54:45 GMT Organization: Boeing Aerospace Corp., Seattle WA Lines: 20 Are ALL arrays in C contiguious? If I declare an array: int x[10]; am I GUARANTEED that x[0] through x[9] will occupy contiguous memory, or is the compiler free to scatter the elements around in memory? I have a difficult time imagining implementing C without contiguous arrays, but is the compiler free to implement non-contiguous arrays if so desired? I have a hard time understanding how one could implement non-contiguous arrays, especially when you have functions such as strcpy(). -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ David Geary, Boeing Aerospace, ~ ~ #define Seattle RAIN ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~