fputc function(Write Character to File) in C Language – example and detail

In the C Programming Language, the fputc feature writes a character to the circulate pointed to via stream.

Syntax

The syntax for the fputc characteristic in the C Language is:

int fputc(int c, FILE *stream);

Parameters or Arguments

c The persona to write to the stream. stream The movement to write to.

Returns

The fputc function returns the character written. If an error takes place writing to the stream, the fputc function will set the stream’s error indicator and return EOF.

Required Header

In the C Language, the required header for the fputc feature is:

#include <stdio.h>

Applies To

In the C Language, the fputc characteristic can be used in the following versions:

ANSI/ISO 9899-1990

Similar Functions

Other C features that are similar to the fputc function:

putc characteristic putchar feature

See Also

Other C functions that are noteworthy when dealing with the fputc function:

fgetc characteristic getc function getchar feature