#include <stdio.h> #include <stdlib.h> main() { FILE *fp; char c; fp=fopen("lhsbqb.txt","w"); if(fp==NULL){printf("file open faild!");exit(0);} for(c='a';c<='z';c++) { fputc(c,fp); } fclose(fp); printf("字每添加完成"); getchar(); }
#include <stdio.h> #include <stdlib.h> main() { FILE *fp; char c; fp=fopen("lhsbqb.txt","w"); if(fp==NULL){printf("file open faild!");exit(0);} for(c='a';c<='z';c++) { fputc(c,fp); } fclose(fp); printf("字每添加完成"); getchar(); }