While reading man page for fread/fwrite(GNU/Linux) functions met phrase: if an error occurs, or the end of file is reached, the return value is a short item count(or zero).
Did not find that words in the dictionaries. Could you please shed some light on meaning of that obscure words? They are not very accurate and meaningful in my opinion.
Well, there's an alternate phrasing in the spce which I believe is clearer. Quoting C11
, chapter §7.21.8.1, (emphasis mine)
The
fread
function returns the number of elements successfully read, which may be less thannmemb
if a read error or end-of-file is encountered. If size ornmemb
is zero, fread returns zero and the contents of the array and the state of the stream remain unchanged.