title: C function change string using pointer
body: <p>I'm trying to make a function that changes a char array from the main function, that's what I'm trying to do:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  
  void change(char *a);
  
  int main()
  {
      char a[] = "hello";
      printf("\na = %s", a);
      change(a);
      printf("%\na = %s", a);
      getch();
  }
  
  void change(char *a)
  {
      a = "goodbye";
  }
  </code></pre>