| Name | Description | Notes | Source | Availability | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
fputc() |
Output character | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
fputwc() |
Output wide character | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
putc() |
Output character | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
putchar() |
Output character to standard output | (·) | <stdio.h> |
C89 | C90 | C95 | C99 | C11 | |||
putwc() |
Output wide character | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
putwchar() |
Output wide character to standard output | (·) | <wchar.h> |
C95 | C99 | C11 | |||||
#include<stdio.h>int putc(int c, FILE *fp); int fputc(int c, FILE *fp); int putchar(int c); #include<wchar.h>wint_t putwc(wchar_t c, FILE *fp); wint_t fputwc(wchar_t c, FILE *fp);
#include <wchar.h>
wint_t putwchar(wchar_t c);
putc and
fputc
each write a single byte c to the
output stream
fp. A char should be
converted to unsigned char before
being passed as c. These functions
return the byte written, or EOF on error.
Similarly, putwc
and fputwc
each write a wide character c to the
output stream
fp. These functions return the
character written, or WEOF on error.
putchar(c)
is equivalent to putc(c,
stdout).
putwchar(c) is equivalent to putwc(c,
stdout).
The functions putc,
fputc and
putchar
are byte-oriented. The functions putwc,
fputwc
and
putwchar are wide-oriented.