FILE *out ???

来源:百度知道 编辑:UC知道 时间:2024/06/08 14:05:00
2级C题库中大多数题都有个FILE *out 格式如下
main()
{char str[10];
FILE *out;
printf("输入");
gets(str);
fun(str,7);
printf("\n%s",str);
out=fopen("outfile.dat",'w');
strcpy(str,"Justsdsf");
fprintf(out,"%s",str);
fciose(out);
}
我只吧主函数写出来了
out=fopen("outfile.dat",'w');
strcpy(str,"Justsdsf");
fprintf(out,"%s",str);
fciose(out);
这一段什么意思

out=fopen("outfile.dat",'w');//打开只写文件"outfile.dat"

strcpy(str,"Justsdsf"); //把"Justsdsf"字符串复制到str里

fprintf(out,"%s",str);//把str写入到outfile.dat这个文件里

fciose(out);//关闭文件