Types of Arrays in C

A list of related values stored in RAM that is called an array. In C, there are two types of array exists.

  • One-Dimensional Array
  • Two-Dimensional Array
  • One-Dimensional Array:

    Values in a mathematical set are written as shown below :
    a={5, 7, 9, 4, 6, 8}

    These values are referred in mathematics as follows :
    a0, a1, a2
    In C, these numbers are represented as follows :
    a[0], a[1], a[2]
    these values are stored in RAM as follows :

    array

    Two-Dimensional Array:

    two-array

    These values are referred in mathematical as follows :
    A0,0 A0,1 A0,2

    In C language, they are represented as follows :
    a[0][0] a[0][1] a[0][2] and so on
    It may be imagined that these values are stored in RAM as follows :

    array2