...

/

Binary Files (raw bytes)

Binary Files (raw bytes)

Let's find out how C reads and writes binary data files.

There are many circumstances in which you may want to read from and write to binary files. Binary files are not plain text (ASCII) files where each chunk of bytes represents an ASCII character. In binary files, you store raw bytes, in whatever format you want.

Advantages of binary files over ASCII files are as follows:

  • They are typically smaller in size.
...