title: Why can I store a string in the memory address of a char?
body: <p>I'm starting to understand pointers and how to dereference them etc. I've been practising with <code>int</code>s but I figured a <code>char</code> would behave similarly. Use the <code>*</code> to dereference, use the <code>&amp;</code> to access the memory address.</p>
  
  <p>But in my example below, the same syntax is used to set the address of a <code>char</code> and to save a string to the same variable. How does this work? I think I'm just generally confused and maybe I'm overthinking it.</p>
  
  <pre><code>int main()
  {
      char *myCharPointer;
      char charMemoryHolder = 'G';
      myCharPointer = &amp;charMemoryHolder;
      printf("%s\n", myCharPointer);
      myCharPointer = "This is a string.";
      printf("%s\n", myCharPointer);
  
      return 0;
  }
  </code></pre>