||What's involved in defining a data type?|
||Defining a data type consists of deciding how to store the data and of designing a set of functions to manage the data.|
||Why can the linked list in Listing 17.2 be traversed in only one direction? How could you modify the struct film definition so that the list could be traversed in both directions?|
||The list can be traversed in only one direction because each structure contains the address of the next structure, but not of the preceding structure. You could modify the structure definition so that each structure contains two pointers, one to the preceding structure and one to the next structure. The program, of course, would have to assign proper addresses to these pointers each time ...|
Get C Primer Plus, Fourth Edition now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.