Converts a wide character to its corresponding multibyte value, and writes the result to a specified file. Format #include <wchar.h> wint_t fputwc (wint_t wc, FILE *file_ptr);
1 – Arguments
wc An object of type wint_t. file_ptr A file pointer.
2 – Description
The fputwc function writes a wide character to a file and returns the character. See also putwc.
3 – Return Values
x The character written to the file. Indicates success. WEOF Indicates an output error. The function sets errno to the following: o EILSEQ - Invalid wide-character code detected. The function can also set errno to the following as a result of errors returned from the I/O subsystem: o EBADF - The file descriptor is not valid. o EIO - I/O error. o ENOSPC - No free space on the device containing the file. o ENXIO - Device does not exist. o EPIPE - Broken pipe. o ESPIPE - Illegal seek in a file opened for append. o EVMSERR - Nontranslatable OpenVMS error. vaxc$errno contains the OpenVMS error code. This indicates that an I/O error occurred for which there is no equivalent C error code.