qfedu-c-level/day14/d6.c

13 lines
280 B
C
Raw Permalink Normal View History

2023-07-21 00:58:46 +08:00
#include <stdio.h>
#include <string.h>
int main()
{
FILE *f = fopen("d6.txt", "a");
// char content[20] = "hello disen";
char *m = "小李";
int n = fputs(m, f); // 单字符写入
printf("已追加内容的结构 n = %d\n", n);
fclose(f);
return 0;
}