for a FILE * stream, if I read as much data as possible, feof (stream) returns me a nonzero value. Then, if I create a stream, it feof (stream) will continue to return me a non-zero value? IS GUARANTEED?
Calling pheof () in a closed file is meaningless (actually worse than meaningless - it is undefined, so anything can happen).
From standard C:
The value of the pointer to a FILE object is undefined after the linked file is closed (including standard text streams).
and
fclose , , , . ; . , , disassociated , setbuf setvbuf ( , ).
fclose() FILE, . , " undefined".
. feof() . - undefined. , - , , EOF.
feof()
, undefined C ... - , - .
Usenet comp.lang.c , DeathStation 9000, undefined. , , undefined C: -)
comp.lang.c
feof().
, f * fclose.
Source: https://habr.com/ru/post/1698001/More articles:How to connect to Oracle database as SYS using ADO connection string? - oracleBad database design. Am I too big a table? - performanceWhat content encoding does the default Perl CGI script use? - perlFocusing on the control when switching tabs - c #How to check a property of a custom object in a data binding script (i.e. a BindingList)? - .netМожете ли/как добавить круг ссылок без нарушения RI? - sqlMS Access Questions - Scalability / Indexing / Transactions - ms-accessVisual Studio 2008 Design Surface Error: "Operation could not be performed. Invalid formatetc structure." - asp.netПравильное присвоение значений enum для С# - enumsEquations for linear mathematical equations - c ++All Articles