title: creating a 2D array out of an array of string pointers in C
body: <p>This is an extension to my previous query - 
  <a href="https://stackoverflow.com/questions/17447283/array-of-string-pointers-in-c">array of string pointers in C</a></p>
  
  <p>I have this working sample code in C</p>
  
  <pre><code>int main(void)
  {
      char *array1 = "12345";
      char *array2 = "abcde";
      char *array3 = "67890";
      char *array4 = "fghij";
  
      char *array_2d[4];
  
      array_2d[0] = array1; 
      array_2d[1] = array2; 
      array_2d[2] = array3;
      array_2d[3] = array4;
  
      int i,j;
  
      for(i = 0; i&lt;=3 ; i++ ) {
          for(j = 0; j&lt;=4 ; j++) {
              printf("%c", array_2d[i][j]);
  
          }
      printf("\n");
      }
  
  }
  </code></pre>
  
  <p>I would like to de-reference</p>
  
  <pre><code>*array1 to *array4
  </code></pre>
  
  <p>i.e. </p>
  
  <pre><code>array_2d[0] -&gt; "12345" 
  ....
  array_2d[3] -&gt; "fghij"
  </code></pre>
  
  <p>and not</p>
  
  <pre><code>array_2d[0] -&gt; array1 -&gt; "12345"
  ....
  array_2d[3] -&gt; array4 -&gt; "fghij"
  </code></pre>
  
  <p>Is this possible ? I would maybe like to increase array_2d to [8]
  and say</p>
  
  <pre><code>array_2d[4] -&gt; array1 -&gt; "ABCDE"
  ....
  array_2d[7] -&gt; array4 -&gt; "FGHIJ"
  </code></pre>
  
  <p>I hope this seems clear....</p>
  
  <p>EDIT - </p>
  
  <p>I think i got it. This is what i was trying to do.</p>
  
  <pre><code>char *array1 = "12345";
  char *array2 = "abcde";
  char *array3 = "67890";
  char *array4 = "fghij";
  
  char *array_2d[8];
  
  array_2d[0] = array1; 
  array_2d[1] = array2; 
  array_2d[2] = array3;
  array_2d[3] = array4;
  
  array1 = "AAAAA";
  array2 = "BBBBB";
  array3 = "CCCCC";
  array4 = "DDDDD";
  
  array_2d[4] = array1; 
  array_2d[5] = array2; 
  array_2d[6] = array3;
  array_2d[7] = array4;
  </code></pre>