Didn't understand ch4:Arrays of pointers
Hi! I don't understand pages 181,182,183.
Especially the section that says:
"Compared to using a ‘normal’ array, the pointer array normally carries less overhead in terms of space. With an array, you would need to make each row the length of the longest string, and six rows of seventeen bytes each is 102 bytes, so by using a pointer array you have saved a whole -1 bytes!"
Why I have saved 1 byte?
Figure 4-7 shows that in the case of the pointer array I am using 103 bytes. I don't understand why 24 bytes are allocated for the pointer array?
In pg. 182 in 3rd paragraph it is mentioned that "With the pointer array as above you just need to swap the pointers". How do I do that?
Thanks
|