Computer Science an overview _j Glenn brookshear _11th Edition
An alternative to storing a heterogeneous array in a block of contiguous memory cells are to store each component in a Sepa Rate location and then link them together by means of pointers. More precisely, if the array contains three components, then we find a place in memory to store three pointers, each of WH Ich points to one of the components (Figure 8.7b). If These pointers is stored in a block starting at address X, then the first component can is found by following the Poin ter stored at location x, the second component can is found by following the pointer at location x 1, and so forth.
This arrangement was especially useful in those cases in which the size of the array ' s are dynamic. For instance, by using the pointer system the size of the first component can is increased merely by finding a area in me Mory to hold the larger component and then adjusting the appropriate pointer to the new location. But if the array were stored in a contiguous block, the entire array would has to be altered.
Implementation of implementing data structures data structure
Storing Arrays heterogeneous Arrays heterogeneous array storage
Link them together by means of pointers