Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-55
fputc
fputc
The fputc function writes a character to a file opened for ANSI I/O.
character
is the character that is sent to the file.
stream
denotes a file opened for ANSI I/O.
Return Value
is the character written if the operation is successful; otherwise, fputc returns the
value EOF.
Example
In this example, the fputc function writes a character to the file $a.b.c:
#include <stdioh>
FILE *fp;
int c;
int status;
fp = fopen("$a.b.c", "w");
c = 'a';
status = fputc(c,fp);
#include <stdioh>
int fputc(int character, FILE *stream);