write the declaration of an array with 15 real elements whose subscript values range from 0 to 14
Answers
Answered by
1
HI,
An array declaration is similar to the form of a normal declaration (typeName variableName), but we add on a size:
This declares an array with the specified size, named variableName, of type typeName. The array is indexed from 0 to size-1. The size (in brackets) must be an integer literal or a constant variable. The compiler uses the size to determine how much space to allocate (i.e. how many bytes).
Examples:
The last example illustrates a two dimensional array (which we often like to think about as a table). We usually think of the first size as rows, and the second as columns, but it really does not matter, as long as you are consistent! So, we could think of the last declaration as a table with 5 rows and 10 columns,
HOPE IT HELPS
Similar questions