C Array Types

In this tutorial we will be learning C Array Types. In C Programming , We have learnt about Array and its advantages , disadvantages and different applications of an array. In this chapter we will study about different types of an array. Array Types are represented using following Tree chart.

C Array Types

Different Types of the array in C Programming language

1.Single Dimensional Array :

  1. Single or One Dimensional array is used to represent and store data in a linear form.
  2. Array having only one subscript variable is called One-Dimensional array
  3. It is also called as Single Dimensional Array or Linear Array

Syntax :

<data-type> <array_name> [size];

Example of Single Dimensional Array :

int iarr[3]   = {2, 3, 4};

char carr[20] = "c4learn" ;

float farr[3] = {12.5,13.5,14.5} ;

2. Multi Dimensional Array :

  1. Array having more than one subscript variable is called Multi-Dimensional array.
  2. Multi Dimensional Array is also called as Matrix.

Syntax :

<data-type> <array_name> [row_subscript][column-subscript];

Example : Two Dimensional Array

int a[3][3] = { 1,2,3
                8,9,0 };