putc()

NAME

fputc(), putc(), putchar() - output a character or word to a stream

SYNOPSIS

#include <stdio.h>

int fputc (int c, FILE *stream) int putc (int c, FILE *stream) int putchar (int c)

DESCRIPTION

The fputc(3) function writes the character c (converted to an unsigned char) to the output stream pointed to by stream.

The putc(3) function acts essentially identically to fputc(3), but is a macro that expands in-line. It may evaluate stream more than once, so arguments given to putc(3) should not be expressions with potential side effects.

The putchar(3) function is identical to putc(3) with an output stream of stdout.

RETURN VALUES

The functions, fputc(3), putc(3) and putchar(3) return the character written. If an error occurs, the value EOF is returned.

SEE ALSO

feof(3)

ferror(3)

fopen(3)

getc(3)