Professional Documents
Culture Documents
Two Dimensional Arrays: by Dr. Karuna
Two Dimensional Arrays: by Dr. Karuna
Two Dimensional Arrays: by Dr. Karuna
By Dr. Karuna
TWO DIMENSIONAL ARRAYS
• Arrays with two subscripts(dimensions/indices) are
called Two dimensional arrays.
• It is widely used in matrix operations.
• Its syntax is:
Data_Type Array_Name[Row_Size][Col_Size];
• Here we can note that Two Dimensional Arrays are "an
array of One-Dimensional arrays of elements of same
type".
• Example:
• int a[3][4];
TWO DIMENSIONAL ARRAYS
• Example:
int a[3][4];
• The above code can be pictorially represented
as shown below:
Initialization of Two Dimensional Arrays