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 single bit to a file?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
no, you can’t… files are organized in bytes, it’s the smallest piece of data you can save.
And, actually, that 1 byte will occupy more than 1 byte of space, in general. Depending on the OS, the system file type, etc, everything you save as a file will use at least one block. And the block’s size varies according to the file system you’re using. Then, this 1-bit will be written as 1 – byte and can occupy as much as 4kB of your disk.
In wikipedia you can read something about the byte being the smallest data unit in many computers.