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 / 634.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-20  |  693KB  |  2550x3300
Labels: book | poster | reckoner
OCR: 634 Chapter C Library and Preprocessor Facilities The value returned b cal loc has type void in an ANSI C com piler (or cha. in an older compiler). It needs tc be cast to the correct type for this application. In this case, it is cast to type struct trans before assigning to the variable array. Note 4 The file pointer is ser back to the beginning of the file in preparation for the input of "the file Note 5: The entire contents of the file are tead with one call to fread() The contents are placed in the memory allocated earlier and pointed to array From this point on, array can be treated almost as ifit were an array of struct trans items Learning Activities 20 Compile and run calloc.c with the sample file you created when you tested the program fwrite.c of l fExample 10-7 (You might need t ...