J
Jordan Abel
They won't necessarily be null.
C89 4.9.2
A binary stream is an ordered sequence of characters that can
transparently record internal data. Data read in from a binary stream
shall compare equal to the data that were earlier written out to that
stream, under the same implementation. Such a stream may, however, have
an implementation-defined number of null characters appended.
IOW... If the underlying filesystem doesn't zero such "garbage
characters" out, the C implementation is required to on closing the
file.
Even if they are, how do you know they weren't written on purpose, and
part of the data?
You'll have to keep track of that yourself. Anyway, it's
"Implementation-defined", not unspecified, so you have to be able to
look it up in the documentation.