Arrays create single or multidimensional
matrices. They are defined by appending an integer encapsulated
in brackets at the end of a variable name. Each additional set
of brackets defines an additional dimension to the array. When
addressing an index in the array, indexing begins at 0 and ends
at 1 less than the defined array. If no initial value is given
to the array size, then the size is determined by the
initializers. When defining a multidimensional array, nested
curly braces can be used to specify which dimension of the array
to initialize. The outermost nest of curly braces defines the
leftmost dimension, and works from left to right.
Defines 5 integers starting at x, and ending at x.
Their values are undefined.
Creates a string. The value at str is the character "y".
The value at str is the null character. The values from
str to str are undefined.
Dimensions the array to 4 (just long enough to hold the
string plus a null character), and stores the string in the
Sets the value of y to 4 and y and y to 0.
The first row initializes joe, the second row joe and
so forth. joe is initialized to 5 zeros.
The same effect is achieved by: