title: Determining the Length of a String Literal
body: <p>Given an array of pointers to string literals:</p>
  
  <pre><code>char *textMessages[] = {
      "Small text message",
      "Slightly larger text message",
      "A really large text message that "
      "is spread over multiple lines"
  }
  </code></pre>
  
  <p>How does one determine the length of a particular string literal - say the third one? I have tried using the sizeof command as follows:</p>
  
  <pre><code>int size = sizeof(textMessages[2]);
  </code></pre>
  
  <p>But the result seems to be the number of pointers in the array, rather than the length of the string literal.</p>