ARRAYS - Home University of Calgary阵列-家居卡尔加里大学
ARRAYSArrays are usually a feature found in __ny programming languages. These are combinations of _
ARRAYS Arrays are usually afeature found in __ny programming languages. These are combinations of ______ types found in the language and are called structured types. They are really aspecial type of data structure which has some abstractions built into the Abstract Data language that allow the user to use the structure easily. Arrays are also an Type and can be defined by the pro__sses which __ke up the structure. These are: 1. Create :Allocate the spa__ required for storing the array. 2. Insert :Insert values into specified elements of the array. 3. Retrieve :Obtain values for specified elements of the array. When arrays are stored, they are generally contiguous in memory, that is, one element follows directly after the other in one large block of memory. The system generally stores the name of the array, the point in memory where the array begins, the number of elements in the array, and the size of each element. The size of the element is determined by ____yzing the type of the element which can be quite ______ or vary in complexity. From auser’s point of view, all that is required is to specify the name of the array and the element number. Elements are usually numbered beginning at 0and are said to be zero-indexed. The structure’s design is such that the user does not need to know how to get to the location requested, this is done by the system. __pping Functions One-dimensional arrays The __pping function is used by the system to find the beginning of the specified array element. Suppose that we h__e an array of 4elements called ‘one’. We can picture this as The system will know its name, the beginning point in memory and the number of elements. However, finding any element will depend on how far it moves down this chunk of memory, so the size of each element must be known and is determined by the type declaration when the array is declared. If the array above stores characters, then 1 byte is required for each element. If we were to store longs, 8bytes would be required for each element. In order to __ke sure the system is looking at the beginning of the byte requested, it uses a__pping function. In general, the __pping function would be

