other data elements can simply be calculated using the base address the formula to perform this calculation isaddress of data elementa[kba(aw( lower_boundherea is the arrayk is the index of the element of which we have to calculate the addressba is the base address of the array aand is the size of one element in memoryfor examplesize of int is example given an array int marks[{ , , , , , , , }calculate the address of marks[ if the base address solution marks[ marks[ marks[ marks[ marks[ marks[ marks[ marks[ we know that storing an integer value requires bytesthereforeits size is bytes marks[ ( ( calculating the length of an array the length of an array is given by the number of elements stored in it the general formula to calculate the length of an array is length upper_bound lower_bound where upper_bound is the index of the last element and lower_bound is the index of the first element in the array example let age[ be an array of integers such that age[ age[ age[ age[ age[ show the memory representation of the array and calculate its length solution the memory representation of the array age[ is given as below ageage[ age[ age[ age[ length upper_bound lower_bound herelower_bound upper_bound thereforelength storing values in arrays when we declare an arraywe are just allocating space for its elementsno values are stored in the array there are three ways to store values in an array firstto initialize the array elements during declarationsecondto input values for individual elements from the keyboardthirdto assign values to individual elements this is shown in fig