title: How to memcpy() from argv[]?
body: <p>I want to copy string from <code>argv[0]</code> but I don't know how to get the size of <code>argv[0]</code>.</p>
  
  <p>How to do this?</p>
  
  <pre><code>int main(int argc, char* argv[])
  {
    char str[20];
    if(argc&gt;0)
        memcpy(str, argv[0], sizeof(argv[0]));
  }
  </code></pre>