title: allocate matrix in C
body: <p>i want to allocate a matrix.</p>
  
  <p>is this the only option:</p>
  
  <pre><code>int** mat = (int**)malloc(rows * sizeof(int*))
  
  for (int index=0;index&lt;row;++index)
  {
      mat[index] = (int*)malloc(col * sizeof(int));
  }
  </code></pre>