##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# fputwc, putwc

From cppreference.com
< c‎ | io

Defined in header `<wchar.h>` |  |
wint_t fputwc( wchar_t ch, FILE *stream ); |  | (since C95)
wint_t putwc( wchar_t ch, FILE *stream ); |  | (since C95)

Writes a wide character `ch` to the given output stream `stream`. putwc() may be implemented as a macro and may evaluate `stream` more than once.

### [edit] Parameters

ch | - | wide character to be written
stream | - | the output stream

### [edit] Return value

`ch` on success, WEOF on failure. If an encoding error occurs, errno is set to `EILSEQ`.

### [edit] Example

| This section is incomplete Reason: no example

### [edit] References

- C11 standard (ISO/IEC 9899:2011):

  - 7.29.3.3 The fputwc function (p: 422-423)

  - 7.29.3.8 The putwc function (p: 424)

- C99 standard (ISO/IEC 9899:1999):

  - 7.24.3.3 The fputwc function (p: 368)

  - 7.24.3.8 The putwc function (p: 370)

### [edit] See also

fputc putc | writes a character to a file stream (function) [edit]
fputws (C95) | writes a wide string to a file stream (function) [edit]
fgetwc getwc (C95) | gets a wide character from a file stream (function) [edit]
C++ documentation for fputwc

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/io/fputwc&oldid=89607"
Category:

- Todo no example