 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
• |
A
one-dimensional array is a collection of
|
|
|
variables
– all of the same type – in which the first
|
|
part
of the variable name is the same, and the last
|
|
|
part
is an index value enclosed in square brackets.
|
|
|
Example:
string
|
|
|
• |
The
declaration of a one-dimensional array is
|
|
|
similar
to the declaration of a simple variable with
|
|
|
one
exception, you must also declare the size of
|
|
|
the
array.
|
|
|
• |
Example:
int value[1000]; The variables
|
|
|
are value[0] – value[999]
|
|