title: Incompatible pointer type during function call
body: <p>I have reduced my code to the following:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  void change_data (char *data);
  
  int main (int argc, char *argv[])
  {
      char data[20] = {0};
  
      strcpy(data, "This is a test.");
      change_data(&amp;data);
  
      exit(EXIT_SUCCESS);
  }
  
  void change_data (char *data)
  {
      printf("%s\n", data);
  }
  </code></pre>
  
  <p>I want to be able to change the main variable in the function.  I thought that using <code>&amp;</code> means sending the address rather than copying the data.  But I get the following error when I compile:</p>
  
  <pre><code>tt.c: In function 'main':
  tt.c:13:14: warning: passing argument 1 of 'change_data' from incompatible pointer type [-Wincompatible-pointer-types]
    change_data(&amp;data);
                ^
  tt.c:5:6: note: expected 'char *' but argument is of type 'char (*)[20]'
   void change_data (char *data);
        ^~~~~~~~~~~
  </code></pre>
  
  <p>Can someone show me what I'm doing wrong, because I don't have a clue.  Ty.</p>