Showing posts with label Two-Dimensional Array. Show all posts
Showing posts with label Two-Dimensional Array. Show all posts

Tuesday, 25 October 2016

Arrays Types in C Programming

Arrays are important to C and should need a lot more attention.

Multidimensional Arrays

C programming language allows multidimensional arrays.
Example:- 

Two-Dimensional Array

The simplest form of multidimensional array is the two-dimensional array. A two-dimensional array is, in essence, a list of one-dimensional arrays.
A two-dimensional array a, which contains three rows and four columns.

Initialized Two-Dimensional Array 

Multidimensional arrays may be initialized by specifying bracketed values for each row.
The nested braces, which indicate the intended row, are optional.

Accessed Two-Dimensional Array Elements 

An element in a two-dimensional array is accessed by using the subscripts, i.e., row index and column index of the array.
Example :-