title: What is String Table in C?
body: <pre><code>char *p = &quot;one two three&quot;;
  </code></pre>
  <p>Apparently, the string constant in this code is stored in the string table. What is &quot;string table&quot;? Is it in the <em>heap</em> or on the <em>stack</em>?</p>
  <p>Information Background: I found this info in <a href="https://rads.stackoverflow.com/amzn/click/com/0078823110" rel="nofollow noreferrer" rel="nofollow noreferrer">
  Teach Yourself C, by Hilbert Schildt</a>, at chapter 6 (Using Pointers).</p>
  <blockquote>
  <p>As you know, C allows string constants enclosed between double quotes to be used in a program. When compiler encounters such a string, it stores it in the program's string table and generates a pointer to the string. For this reason, the following program is correct and prints - one two three.</p>
  <pre><code>#include&lt;stdio.h&gt;
  int main(void){
    char*p = &quot;one two three&quot;;
    printf(p);
    return 0;
  }
  </code></pre>
  </blockquote>