2D-Arrays
,Multi-Dimensional Array
• Dimensions represent no. of indices used to access particular item
the array
• Array with one set of square brackets is called one dimensional ar
• Array with two set of square brackets is called two dimensional
array
• Array with two or more set of square brackets is called multi
dimensional array
, 2D Array
• 2D Array is an array which consists of two set of square brackets
[]
• In 2D Array the data is stored in row and column wise i.e tabular form
• It stores table of values of same data type
• To access the elements of array we need to specify two indices
• 1st index – row number
• 2nd index – column number
Column-0 Column-1 Column-2
Pictorial Row-0 A[0][0] A[0][1] A[0][2]
representation
of 2Darray Row-1 A[1][0] A[1][1] A[1][2]
,Multi-Dimensional Array
• Dimensions represent no. of indices used to access particular item
the array
• Array with one set of square brackets is called one dimensional ar
• Array with two set of square brackets is called two dimensional
array
• Array with two or more set of square brackets is called multi
dimensional array
, 2D Array
• 2D Array is an array which consists of two set of square brackets
[]
• In 2D Array the data is stored in row and column wise i.e tabular form
• It stores table of values of same data type
• To access the elements of array we need to specify two indices
• 1st index – row number
• 2nd index – column number
Column-0 Column-1 Column-2
Pictorial Row-0 A[0][0] A[0][1] A[0][2]
representation
of 2Darray Row-1 A[1][0] A[1][1] A[1][2]