/* fputs example */ #include <stdio.h> int main () { FILE * pFile; char sentence [256]; printf ("Enter sentence to append: "); fgets (sentence,256,stdin); pFile = fopen ("mylog.txt","a"); fputs (sentence,pFile); fclose (pFile); return 0; } |
puts | 从将字符串写入标准输出(function ) |
fputc | 将字符写入流(function ) |
fwrite | 将数据块写入流(function ) |
fprintf | 将格式化的数据写入流(function ) |
puts | 将格式化的数据写入流(function ) |