title: I need to create a very large array of bits/boolean values. How would I do this in C/C++?
body: <p>Is it even possible to create an array of bits with more than 100000000 elements? If it is, how would I go about doing this? I know that for a char array I can do this:</p>
  
  <p><code>char* array;</code></p>
  
  <p><code>array = (char*)malloc(100000000 * sizeof(char));</code></p>
  
  <p>If I was to declare the array by <code>char array[100000000]</code> then I would get a segmentation fault, since the maximum number of elements has been exceeded, which is why I use <code>malloc</code>. </p>
  
  <p>Is there something similar I can do for an array of bits?</p>