《Linux函数调用手册》之___
putc
将一指定字符写入文件中
定义:
int putc(int c,FILE * stream);
表头文件:
#include<stdio.h>
说明:
putc()会将参数c转为unsigned char后写入参数stream指定的文件中。虽然putc()与fputc()作用相同, 但putc()为宏定义, 非真正的函数调用。
返回值:
putc()会返回写入成功的字符, 即参数c。若返回EOF则代表写入失败。
相关函数:
fopen, fwrite, fscanf, fputc
示例:
参考fputc()。
返回顶部
|
《Linux函数调用大全》
|
《Linux命令大全》
|
Linux专栏