It is possible to write less than 1 byte to a file

前端 未结 4 2057
忘了有多久
忘了有多久 2021-02-19 09:00

As far as I know the smallest unit in C is a byte. Where does this constraint comes from? CPU?

For example, how can I write a nibble or a singl

4条回答
  •  自闭症患者
    2021-02-19 09:40

    The smallest you can get is 1 byte. That's as much as one 1 in binary. If you save a file called binary.bin that just contains a 1, that will take 1 byte

提交回复
热议问题