home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_11 / 637.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-20  |  664KB  |  2550x3300
Labels: binder | book | crt screen | poster | reckoner
OCR: 11.6 A Linked List -The Theory and an Example 637 ch line of struct node *get node space void itains two that will struct node *temp ptr /* Note I line as temp ptr mall Loc( sizecf struct node ); struct node in the list NULL if temp printf "out memor cy for nodes \n" exit return temp ptr The purpose of this function is to allocate the space for node to in the make linked sure list. calls mal. loc( to get the space and checks its return value that the space allocation was successful. The program is terminated 11 the space was not obtained. The pointer the first byte space returned to the calling function Note 1: The parameter in the call tomalloc () specifies that enough memory store struct node requested The cast to truct node must be used to force that address to be the address ofastruct ...