>and that it takes up one byte of memory
You can make them smaller using bitfields in C.
The object it's inside will still take up at least one byte.
sizeof(struct {bool a:1;}) == sizeof(char);
Um, no. Please show me how you can fit 255 possible states in something smaller than a byte by using bitfields.
The object it's inside will still take up at least one byte.