title: Is snprintf() ALWAYS null terminating?
body: <p>Is snprintf always null terminating the destination buffer?</p>
  
  <p>In other words, is this sufficient:</p>
  
  <pre><code>char dst[10];
  
  snprintf(dst, sizeof (dst), "blah %s", somestr);
  </code></pre>
  
  <p>or do you have to do like this, if somestr is long enough?</p>
  
  <pre><code>char dst[10];
  
  somestr[sizeof (dst) - 1] = '\0';
  snprintf(dst, sizeof (dst) - 1, "blah %s", somestr);
  </code></pre>
  
  <p>I am interested both in what the standard says and what some popular libc might do which is not standard behavior.</p>