title: How to print a string using printf without it printing the trailing newline
body: <p>I'm trying to print some strings using <code>printf()</code> but they are <del>null terminated</del> having trailing newline and that messes with the formating:</p>
  
  <pre><code>printf("The string \"%s\" was written onto the file \"%s\"", str, fname);
  </code></pre>
  
  <p>Say the string contains <code>"The Racing car."</code> and the file name is <code>"RandomText1.txt"</code>
  This prints:</p>
  
  <pre><code>The string "The Racing car.
  " was written onto the file "RandomText1.txt
  "
  </code></pre>
  
  <p>However I want it to print in just one line:</p>
  
  <pre><code>The string "The Racing car." was written onto the file "RandomText1.txt"
  </code></pre>
  
  <p>I know I can modify the strings to get rid of the <del>null terminator</del> newline but I'd like a way, if possible, to achieve this output without modifying the strings.</p>
  
  <p>Is it possible?</p>