(Compatible with UNIX System V C)
#include <stdio.h> i = putw( w, f );
"putw" outputs a word to the indicated file. It returns "w" unless there was an output error, in which case it returns EOF. Since EOF is a valid integer value, you should use "feof" to make sure that the EOF you receive is not just an output value.
Note that "putw" neither assumes nor causes any special alignment in the file.
Copyright © 1996, Thinkage Ltd.