Is it possible to create a data type of length one bit in C

后端 未结 8 1951
醉话见心
醉话见心 2020-12-09 16:28

Esentially I want to create a data type uint1_t. Is that even possible?

I know the size of the bool data type is one byte. But boolean values only need

8条回答
  •  [愿得一人]
    2020-12-09 17:01

    Yes you can create a one bit variable suppose int a:1; You can just assign value to it but cannot scanf it.

提交回复
热议问题