Arrays are used to store large information in the same variable having some size.The information must be of the same data-type. It is declared as a[10].Here 'a' is the variable and '10' mentions its size. So declaring it goes this way , int a[10]; it means it is an array of integer data-type.
hi ramakrishna, Array is a group of related data items that share a common name, array index starts with ZERO. there are 2 types of arrays 1) one-dimensional array: A list of items can be given to a variable name using only one subscript and such a variable called as a one dimensional array. example: int arr[5]; // it declares an array, means we can store only 5 integer type values into this array named arr. ... we can initialize array variable as arr[5]={1,5,3,2,4}; we can access an array using its index values like arr[0] // it is the first element in the array, as i said array index start with zero. and arr[0] contains value 1, arr[2]=5 and so on... 2) multi-dimensional array A list of items can be given to a variable name using more than one subscript and such a variable called as a multi-dimensional array. exmple two dimensional array a[2][3]; // it stores 6 elements in matrix fassion i,e 2 rows and 3 columns int a[2][3]={ {5,7,9},{4,5,2} }; or int a[2][3]={5,7,9,4,5,2}; } this is the matrix view to access the variable a[2][3] 0 1 2 ---------------- 0 | 5 7 9 1 | 4 5 2 a[0][0] =5 a[0][2]= 9 a[1][1]= 5 i hope this vl gve u an idea about arrays ....
one very important thing about arrays is that memory allocations are arranged in adjacent memory locations and they are a form of linear data structures
Arrays are data structures which contain linearly ordered homogeneous data items which are stored in continous memory allocations. Arrays are represented as a[10]; where 'a' is the name of the array and '10' within square brackets called the together subscribt of that array, denotes the size of that array. array can be single dimensional or multidimensional.in One dimensional arrays only one subscribt will be there eg:-a[10]; but for multidimensional arrays there can be more than one subscribt.eg:-[10][10][10][1][2]........