帮你写了个简单的你看看就知道怎么写入了:)#include"stdio.h"
#define MAX 1000
main()
{FILE *fp;
int i=0;
char sky[MAX];
printf("please input:\n>>");
gets(sky);
fp=fopen("001.txt","w");
while(sky[i]!='\0' )
{fprintf(fp,"%c",sky[i]);
i++;
} ;
fclose(fp);
printf("write over!");
getch();}