Use of Readonly Memory in Data Segment
<p>As per my understanding, Data Segment consists of 2 parts. </p>

<pre><code> 1. Initialized segment.
    a. Read Only.
    b. Read/Write.
 2. Uninitialized segment.
</code></pre>

<ul>
<li>The Read/Write memory is for variables declared at file scope as well as static local variables.</li>
<li>The Read only memory is for constants such as strings.</li>
</ul>

<p>Example:</p>

<pre><code>int main(void)
{
   char* cptr = "Hello"; // The string "Hello" will sit in 'Read only' memory.
   //cptr[2] = 'Z'; // Gives seg fault. 
   ...
   return 0;
}
</code></pre>

<p>My question is, Is 'Read-only' memory only used to store string constants?</p>