Writes data to a file.
int _write (int handle, char * buffer, unsigned int count);
int write (int handle, char * buffer, unsigned int count);
Required Header |
<io.h> |
Return Value
Each of these functions returns the number of bytes written.
Parameters
handle
A handle to an open file
buffer
A pointer to the data to write
count
The number of bytes to be write
Remarks
The _write function writes count bytes to the file represented by handle from the characters in buffer. A translation may take place as described in _open.
The function may return a value less than count if the file ran out of space.