I am in need of implementing an efficient bit array in C. From what I have seen C does not support this so you can use an array of integers (according to one site I looked at) and then use a shift to access individual bits. Would simply declaring a bool array be the same thing or is this less memory efficient?
_boolin C is generally anintinternally. A_bool[]uses about 32 times (give or take) as much memory as the array of integers with bit-shifted access._Bool(not_bool) is typically 1 byte, not the same size asint.CHAR_BIT. I said give or take. You've just taken a lot...