Accessing Array Elements: Where Indexexp1 and Indexexp2 Are Expressions Yielding Non-Negative Integer Values
Accessing Array Elements: Where Indexexp1 and Indexexp2 Are Expressions Yielding Non-Negative Integer Values
MULTI-DIMENSIONAL ARRAY
Two-Dimensional Array
- A collection of a fixed number of elements arranged in rows and columns(that is, in two dimensions),
wherein all the elements are of the same type.
Declaring Two-Dimensional array:
dataType[ ] [ ] arrayName
where dataType is the data type of the array elements.
Suppose that:
int x=5, y=3;
0
1
2
3
4
is equivalent to Sales[x][y]=2.3;
2
Jclight09
JORDAN T. COLCOL
Jclight09
JORDAN T. COLCOL