title: Why does the string returned by ctime() contain a line feed?
body: <p>Why does the string returned by <code>ctime()</code> have a line feed (<code>0x0A</code>) as its final character?  For example, this code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  
  int main(int argc, char* argv[])
  {
      time_t now;
      time(&amp;now);
      char* time_str = ctime(&amp;now);
      std::cout &lt;&lt; time_str &lt;&lt; "why is this on a new line?" &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>...produces the following output:</p>
  
  <pre><code>$ ./time.exe
  Wed Oct 23 14:52:29 2013
  why is this on a new line?
  $ 
  </code></pre>
  
  <p>It's not a big deal; I can strip the final byte from the string, but why does <code>ctime()</code> put it there in the first place?</p>