I am new in C. And I wonder can I create a variable with only one bit in the c programming language? or a variable with three bits.
For example :
variable_type var1=0; /* 1 bit */
printf("%d",sizeof(var1)); /* output= 0.125 */
variable_type var2=5; /* 3 bit ,binary= 101 */
printf("%d",sizeof(var2)); /* output=0.375 */
The "sizeof()" notation above is probably wrong. I did something like this to explain myself.And I assume you know. 1 byte = 8 bits.
Thanks.