title: When to use strncpy or memmove?
body: <p>(gcc 4.4.4 c89)</p>
  
  <p>I have always used <code>strncpy</code> to copy strings. I have never really used <code>memmove</code> or <code>memcpy</code> very much. However, I am just wondering when would you decide whether to use <code>strncpy</code>, <code>memmove</code>, or <code>memcpy</code>?</p>
  
  <p>The code I am writing is for a client/server application. In the documentation they use <code>bcopy</code>. However, could I do the same with the others?</p>
  
  <pre><code>bcopy((char*)server-&gt;h_addr,
        (char*)&amp;serv_addr.sin_addr.s_addr,
        server-&gt;h_length);
  </code></pre>
  
  <p>Many thanks,</p>