title: Strcpy() function parameters
body: <p>I am using the function <code>strcpy()</code> a lot for an assignment. Looking at the function prototype for <code>strcpy()</code>:</p>
  
  <pre><code>char *strcpy(char *dest, const char *src)
  </code></pre>
  
  <p>It can be seen that <code>strcpy()</code> takes in two pointers.</p>
  
  <p>However, I have seen in a lot of examples online as well as in my own code that a string can be copied in the following manner and it will work:</p>
  
  <pre><code>char array[30];
  strcpy(array, "mystring");
  printf("%s\n", array);
  </code></pre>
  
  <p>My question is, why does <code>strcpy()</code> work if the second parameter that you're passing is a string? Wouldn't the second parameter need be a pointer to a string? E.g. wouldn't you have to do the following:</p>
  
  <pre><code>const char *str = "mystring";
  char array[30];
  strcpy(array, str);
  printf("%s\n", array);
  </code></pre>
  
  <p>I'm confused about why you can directly pass a string as the second parameter to <code>strcpy()</code> and not a pointer to the string. Any insights would be really appreciated.</p>