|
| fputs| Summary | |
#include <stdio.h>
int fputs (
const char *string, /* string to output */
FILE *stream); /* file stream to write to */
| | Description | | The fputs function writes string to the output file stream at the current file position. The fputs function is in the RL-FlashFS library. The prototype is defined in stdio.h. | | Return Value | | The fputs function returns 0 if successful. A return value of EOF indicates an error. | | See Also | | fgets, fputc | | Example | |
#include <rtl.h>
#include <stdio.h>
void tst_fputs (void) {
FILE *fout;
fout = fopen ("Test.txt","w");
if (fout == NULL) {
printf ("File open error!\n");
}
else {
fputs("This is an example for fputs.\n", fout);
fclose (fout);
}
}
|
|
|