主页
C 语言
C 写入文件
c_demo_files_append
运行 ❯
×
更改方向
保存代码
更改主题
#include
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; }
Append Content To a File Example
This is just an example to show what it looks like when you append content to a file: