獲取你自己的
網站
×
更改方向
更改主題,深色/淺色
前往 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; }
追加內容到檔案示例
這只是一個例子,用於展示追加內容到檔案是什麼樣子。