search 登录 注册
arrow_back返回列表
ID:106008
light_modedark_modestar
Lv.6 胸怀六国志
edit_note帖子 477
stars积分 406,560
event加入 2012-05-02
怀旧国机

函数名: feof

schedule发表于 2012-12-02 17:10:00 visibility查看 153 chat_bubble回复 0
#1 楼主
函数名: feof
功 能: 检测流上的文件结束符
用 法: int feof(FILE *stream);
程序例:
#include <stdio.h>
int main(void)
{
FILE *stream;
/* open a file for reading */
stream = fopen(“DUMMY.FIL“, “r“);
/* read a character from the file */
fgetc(stream);
/* check for EOF */
if (feof(stream))
printf(“We have reached end-of-file\n“);
/* close the file */
fclose(stream);
return 0;
}

forum
暂无回复,快来抢沙发!
登录 后才能回复