data structures using data type [ int marks [ ][ [ [ [ [ [ [ [ [ array name [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ char name [ ]array size [ float salary [ ][ [ [ [ figure declaring arrays of different data types and sizes accessing the elements of an array storing related data items in single array enables the programmers to develop concise and efficient programs but there is no single function that can operate on all the elements of an array to access all the elementswe must use loop that is/set each element of the array to - we can access all the elements of an array by varying the value of the subscript into the array but note that the int imarks[ ]for( ; < ; ++subscript must be an integral value or an expression that marks[ - evaluates to an integral value as shown in fig the first element of the array marks[ can be accessed by figure code to initialize each element of the writing marks[ now to process all the elements of the array to - arraywe use loop as shown in fig figure shows the result of the code shown in fig the code accesses every individual element of the array and sets its value to - in the for loopfirst the value of marks[ is set to - then the value of the index (iis incremented and the next valuethat ismarks[ is set to - the procedure continues until all the elements of the array are set to - - - - - - - - - - - [ [ [ [ [ [ [ [ [ [ figure array marks after executing the code given in fig note there is no single statement that can readaccessor print all the elements of an array to do thiswe have to use loop to execute the same statement with different index values calculating the address of array elements you must be wondering how gets to know where an individual element of an array is located in the memory the answer is that the array name is symbolic reference to the address of the first byte of the array when we use the array namewe are actually referring to the first byte of the array the subscript or the index represents the offset from the beginning of the array to the element being referenced that iswith just the array name and the indexc can calculate the address of any element in the array since an array stores all its data elements in consecutive memory locationsstoring just the base addressthat is the address of the first element in the arrayis sufficient the address of