Structured Data Type: Arrays

Arrays are a series of elements (variables) of the same type placed consecutively in memory that can be individually referenced by adding an index to a unique name.
An Array declaration is very similar to a variable declaration. For eg:
float annual_temp[10];
This will cause the compiler to allocate space for 10 consecutive float variables in memory. The number of elements in an array must be fixed at compile time. The elements of an array are ordered by the index. Array index numbering starts from zero. LEARN MORE>>

No comments: