获取你自己的
网站
×
更改方向
更改主题,深色/浅色
前往 Spaces
#include <stdio.h> int main() { FILE *fptr; // Open a file in append mode fptr = fopen("filename.txt", "a"); // Append some text to the file fprintf(fptr, "\nHi everybody!"); // Close the file fclose(fptr); return 0; }
追加内容到文件示例
这只是一个例子,用于展示追加内容到文件是什么样子。