SourcePoint Intel Help

Table of Contents

fputc

Write a character to a file.

Syntax

fputc(char, file_handle)

Where:

char

is the character to write.

file_handle

is the file handle returned from a previous fopen command

Discussion

The fputc function writes a character to a file previously opened by an fopen command.

Example

Command input:

define ord4 file1
file1 = fopen("test.dat", "w")
fputc('A', file 1)
fclose(file1)
file1 = fopen("test.dat", "r")
fgetc(file1)

Result:

65T

Related Topics: