title: Copying string literals in C into an character array
body: <p>I have a string literal:</p>
  
  <pre><code>char *tmp = "xxxx";
  </code></pre>
  
  <p>I want to copy the string literal into an array.</p>
  
  <p>For example:</p>
  
  <ul>
  <li><p>how do I copy <code>tmp</code> into an <code>char array[50]</code>?</p></li>
  <li><p>and how to copy one string literal to another?</p></li>
  </ul>