c语言函数fputs



c语言函数fputs。

函数名: fputs
功 能: 送一个字符串到一个流中
用 法: int fputs(char *string, FILE *stream);
参数: string是要写入文件的字符串。
stream 很明显是一个FILE对象。
程序例:
#include <stdio.h>
int main(void)
{
FILE *fpout=fopen(“1.txt”,”wr”);//

fputs(“Hello world\n”, fpout);
return 0;
}