title: C: why printing a null char with %s prints "(null)"?
body: <p>Why does printing a null char ('\0', 0) with %s prints the "(null)" string actually?</p>
  
  <p>Like this code:</p>
  
  <pre><code>char null_byte = '\0';
  printf("null_byte: %s\n", null_byte);
  </code></pre>
  
  <p>...printing:</p>
  
  <pre><code>null_byte: (null)
  </code></pre>
  
  <p>...and it even runs without errors under Valgrind, all I get is the compiler warning <code>warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat]</code> (note: I'm using gcc 4.6.3 on 32bit Ubuntu)</p>