home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_10 / 575.jpg < prev    next >
Joint Photographic Experts Group Image  |  2014-01-29  |  772KB  |  2550x3300
Labels: book | poster | reckoner
OCR: 10.5 Reading Blocks of Data at a Time 575 10.5 Reading Blocks of Data at Time The library provides the functions fread and fwri te to read and write blocks of data. The function fread() takes four parameters fread( buffer, size number The parameter, buffer, is the address of an array or area of memory where the input data will be stored The memory must be allocated in the program. The second parameter .ze indicates the size of the elements to be read; its type coincides with the type returned bv sizeof() (size in ANSI and one of the integer types, usually uns igned int in earlier versions of The third parameter to fread the numbe of elements to read; its type will be either (in ANSI C or an integer type. The product of the values passed in the second and third parameters gives the total nu ...