Pages

Showing posts with label 2D ARRAY. Show all posts
Showing posts with label 2D ARRAY. Show all posts

Saturday, January 31, 2015

2D ARRAY

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