Put a word on a stream
#include <wchar.h> int putw( int w, FILE *stream );
- The word that you want to write.
- The stream that you want to write a word on.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The putw() function writes the C int (word) w to the standard I/O output stream (at the position of the file pointer, if defined). The size of a word is the size of an integer, and varies from machine to machine. The putw() function neither assumes nor causes special alignment in the file.
- An error occurred; errno is set.
- The file is a regular file and an attempt was made to write at or beyond the offset maximum.
Because of possible differences in word length and byte ordering, files written using putw() are machine-dependent, and might not be read correctly using getw() on a different processor.
Last modified: 2013-09-30