Free
|
|
|
|
|
Arrays in C: - C Programming Tutorial
Array can be easily defined as a variable that hold multiple elements which has the same data type. C uses arrays as a way of describing a collection of variables with identical properties. type variable_name[lengthofarray]; Simple Program showing an array of 5 elements. In this case we have ages[5] as an array. i.e ages[0],ages[1],ages[2],ages[3],ages[4].
Example of Array Declaration: double arr[100] Another example :
int myArray[5] = {1, 2,
3, 4, 5}; //declaring and initialize the array in
one statement
Declaration of a 2D array in C language: Example:
int array[3][3] = {1, 2,
3, 4, 5};
See this program of Matrix Multiplication using the concept of Arrays. Multiplying Matrices with Each Other.
COPYRIGHT 2009 ALL RIGHTS RESERVED FREECPROGRAMS.COM
|
|