◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────Run-Time Library─────────────────────────────────────────────────────── The fread function reads up to <count> items, of <size> bytes each, from the input <stream> and stores them in <buffer>. The file pointer associated with <stream> (if there is one) is increased by the number of bytes actually read. If the given stream is opened in text mode, carriage-return─ linefeed pairs are replaced with single linefeed characters. The replacement has no effect on the file pointer or the return value. If an error occurs, both the file-pointer position and the value of a partially read item are indeterminate. Return Value The fread function returns the number of full items actually read, which may be less than <count> if an error occurs or if end-of- file is encountered before reaching <count>. The feof or ferror function should be used to distinguish a read error from an end-of-file condition. If <size> or <count> is 0, fread returns 0 and the buffer contents are unchanged. -♦-