title: Copying characters using pointers causes segmentation fault
body: <p>This is my first post. I am trying to copy characters from one pointer to the end of another however a segmentation fault is caused. What is the appropriate way to write this?</p>
  
  <pre><code>char *my_strcat(char *dest, char *src) {
      while (*dest != '\0')
          dest++;
  
      while (*src != '\0'){
          *dest = *src;
          dest++;
          src++;
      }
      *dest = '\0';
  
  return dest;
  }
  
  int main(void) {
      char *p = "Hello";
      char *q = "Carl";
  
      printf("%s\n", my_strcat(p, q));
  }
  </code></pre>
  
  <p>The only error that it causes is a segmentation fault.</p>
  
  <p>Thank you!</p>