title: Is there a difference between const char * const and const char []?
body: <p>Consider the two following lines of code:</p>
  
  <pre><code>const char *ptr = "Hello";
  char arr[] = "Hello";
  </code></pre>
  
  <p>For the pointer definition, the <code>"Hello"</code> string literal is essentially <strong>immutable</strong>, but the <code>ptr</code> variable itself can change and hold a different address.</p>
  
  <p>For the array definition, the <code>"Hello"</code> string literal is <strong>copied</strong> to the location of the array, but <code>arr</code> <em>cannot</em> point to a different location; however, the string held by the array is mutable and thus can be changed.</p>
  
  <p>Now consider the following two lines of code:</p>
  
  <pre><code>const char * const ptr = "Hello";
  const char arr[] = "Hello";
  </code></pre>
  
  <p>Here, both strings are <strong>immutable</strong> as a result of the <code>const char</code> qualifier -- more interesting though: with <code>ptr</code> defined as a constant pointer, it <em>cannot</em> point to a different address.</p>
  
  <p>Would these two lines of code result in the same behavior? If the end effect is the same, is there a theoretical difference in implementation -- for example, does the pointer method allocate memory for an anonymous array to hold the string in addition to the pointer itself, while the array method only allocates memory for an array?</p>