fgets() returns NULL at EOF??

BJORNDAS%CLARGRAD.BITNET at WISCVM.WISC.EDU BJORNDAS%CLARGRAD.BITNET at WISCVM.WISC.EDU
Wed Aug 20 14:02:17 AEST 1986


O great C gurus, help a relative greenhorn!  Why is it that fgets()
returns NULL when it reaches end of file, whereas all the other
standard i/o functions seem to return EOF at that point?  This
confuses me, especially since one would suppose fputs() to be the
partner function of fgets() and therefore to work in the same way.

Sterling Bjorndahl
BJORNDAS at CLARGRAD on BITNET



More information about the Comp.lang.c mailing list