#include<stdio.h>
void writeFileChar();
int main()
{
writeFileChar();
return 0;
}
//按字符写入
void writeFileChar()
{
FILE* fp = fopen("demo.txt", "a");
if (fp == NULL)
{
perror("file open failed ");
return;
}
//写入26个英文字母
for (int i = 0; i < 26; i++)
{
fputc('a' + i, fp);
}
fclose(fp);
}