title: Unwanted character at the end of printf
body: <p>I have written a small program that takes a string input, and outputs the string with each character number moved up by 3. Only problem is at the end of each string it prints a <code>%</code> character.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdio.h&gt;
  #include &lt;string&gt;
  
  int main()
  {
      std::cout &lt;&lt; "Input message: " &lt;&lt; std::endl;
      std::string mes;
      std::cin &gt;&gt; mes;
      for(char&amp; c : mes)
      {
          printf ("%c", c+3);
      }
  }
  </code></pre>
  
  <p>This is the use and output of the program:</p>
  
  <pre><code>Input message:
  hi
  kl% 
  </code></pre>