Declaration :--
datatype arr[][];or
datatype [][]arr;
int a[][];
Memory Allocation:--
arr = new datatype[rowwise][colum wise];
a = new int [3][4];
marks = new int[25][5];
scales = new float[10][4];
int[][] = new int [3][4];
INITIALIZATION:--
int a[][] = {{1,2,3,4},{5,6,7,8},{9,10,11,12}};
1 2 3 4
5 6 7 8
9 10 11 12
No comments:
Post a Comment