Multidimensional Arrays

 Multidimensional Arrays

·        Array is set of similar data types, which can be referred by common name.

·        Array is called subscripted variable because array uses the subscript i.e. []

·        The array is called as indexed variable because the array elements can be accessed by using index number.

·        Array are divided into following types

1)     One dimensional array (or single – subscripted array)

2)     Two-dimensional array (or double – subscripted array)

3)     Multi-dimensional array (or multi – subscripted array)

 

Multidimensional Arrays :

            The arrays using more than two subscripts are known as multidimensional arrays.

Syntax:

            Datatype   variable_name  [page size] [Row size] [Column size];

Here,

Data type – type of element that is to store in array

[]- known as subscript 

Page size – is maximum possible pages that can be stored in an array.

Row Size- is maximum possible rows that can be store in an array.

column Size- is maximum possible columns that can be store in an array.

Example:

            int a[2][5][3]; - here, int is datatype ,a is array name/ variable name and page size is 2,  Row size is 5 & Column size is 3.

Post a Comment

0 Comments