title: C : Write char array (containing '1' and '0') into as binary in a file
body: <p>I'm having troubles writing char arrays of '1' and '0' 's as binary in a file.
  Here is an example of what I'm trying to do :</p>
  
  <pre><code>int main(){
    FILE * file;
    file = fopen("file" , "w+b");
  
    char buffer[8] = "11001100"; // 8 bits-&gt; 1 byte to write
  
    fwrite(buffer,1,8,file);
  
    fclose(file);
    return 0;
  }
  </code></pre>
  
  <p>The problem is it writes itself as text in my file (8 bytes written), not as binary/just 1 byte.</p>
  
  <p>What am I doing wrong ?</p>
  
  <p>Thanks in advance for your help.</p>