title: Using malloc for allocation of multi-dimensional arrays with different row lengths
body: <p>I have the following <code>C</code> code :</p>
  <pre><code>int *a;
  size_t size = 2000*sizeof(int);
  a = malloc(size);
  </code></pre>
  <p>which works fine. But if I have the following :</p>
  <pre><code>char **b = malloc(2000*sizeof *b);
  </code></pre>
  <p>where every element of <code>b</code> has different length.</p>
  <p>How is it possible to do the same thing for <code>b</code> as i did for <code>a</code>; i.e. the following code would hold correct?</p>
  <pre><code>char *c;
  size_t size = 2000*sizeof(char *);
  c = malloc(size);
  </code></pre>