server-api-fgetc Posted on 2019-04-03 Edited on 2023-05-21 原型用于从文件流中读取一个字符 12345// stream:已打开的文件流指针//// return:// 返回读取到的字符,若返回EOF则表示到了文件尾。int fgetc(FILE * stream); 使用参考123456789101112131415#include <stdio.h>int main(){ FILE *fp; int c; fp = fopen("test", "r"); while((c=fgetc(fp)) != EOF){ printf("%c",c); } fclose(fp); return 0;}