title: Allocating dynamic 2D char array
body: <p>gcc 4.6.2 c89</p>
  
  <p>Allocating memory for a 2D array and filling with characters.</p>
  
  <p>However, I don't seem to be filling as when I print nothing is displayed.</p>
  
  <p>Am I doing something wrong here?</p>
  
  <pre><code>char **attributes = NULL;
  
  /* TODO: Check for memory being allocated */
  attributes = malloc(3 * sizeof(char*));
  int i = 0;
  int k = 0;
  
  for(i = 0; i &lt; 3; i++) {
      for(k = 0; k &lt; 5; k++) {
          sdp_attributes[i] = malloc(5 * sizeof(char));
          sdp_attributes[i][k] = k;
      }
  }
  
  for(i = 0; i &lt; 3; i++) {
      for(k = 0; k &lt; 5; k++) {
          printf("attributes[i][k] [ %c ]\n", attributes[i][k]);
      }
  }
  </code></pre>
  
  <p>Many thanks for any advice,</p>