title: Trying to remove a char from a string using pointers
body: <p>I am trying to figure out a way to remove a char from a string based on an index value using pointers <strong>and not touching array notation (by which I essentially mean not using any brackets)</strong> at all. As far as I understand *letter = temp should assign what is in temp into the location of letter, but it creates a segmentation fault instead.</p>
  
  <pre><code>char *word = "blue";
  int length = strlen(word);
  int index = 0;
  
  for (index; index &lt; length; index++)
  {   
      char *letter = word + index;
      char temp;
      temp = *(letter + 1);
      *letter = temp;
  }
      printf("%s\n", word);
  </code></pre>
  
  <p>Edit: Bolded something that the answers seem to be ignoring.</p>