_read

Read data from a file.

int _read (int handle, char * buffer, unsigned int count);

int read (int handle, char * buffer, unsigned int count);

Required Header
<io.h>

Return Value

Each of these functions returns the number of bytes read.

Parameters

handle

  A handle to an open file

buffer

  A pointer to the data storage location

count

  The number of bytes to be read

Remarks

The _read function reads the next count bytes from the file represented by handle and puts the characters in buffer. A translation may take place as described in _open.

If the function tries to read past the End Of File, then no error occurs but the result returned is zero.

Low Level I/O

See Also    fread, _open, _write