Arrays are stored with their elements in a specific storage order. The elements are actually stored in a linear sequence of storage elements.
C arrays are stored in row-major order; the last subscript in a multidimensional array varies the fastest.
String data types are simply arrays of char elements.
Table A-15 Automatic Array Types and Storage
Type |
Maximum Number of Elements |
---|---|
char |
268435455 |
short |
134217727 |
int |
67108863 |
long |
67108863 |
float |
67108863 |
double |
33554431 |
long double |
1677215 (SPARC) 22369621 (Intel) |
33554431 |
Static and global arrays can accommodate many more elements.