[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FPUTS
. Summary
fputs(str <s>, int <fh>);
. Description
The fputs function writes a string to the file represented by file
handle <fh>. The string must be 512 bytes in length or less (all
strings end in a zero (0) value, the use of which is usually trans-
parent; characters are written until this 0 is encountered. The 0 is
not written).
. Return Value
A 0 value is returned if the write is successful, a non-zero value
if it is not.
. Example
int f, i;
f = fopen("test.dat", "w");
for (i = 0; i < 100; ++i) // write out "Hello" and a new-
fputs("HelloMJ", f); // line one hundred times
See Also:
fputc
fgets
fread
fwrite
fgetc
fputc
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson