title: Best way to allocate memory to a two-dimensional array in C?
body: <p>What is the best way to allocate memory to a <code>two-d array</code> in <code>C</code>,from both the perspectives : <code>memory-management</code> and <code>speed</code> ? </p>
  
  <p>Also, which is better to use, a <code>two-d array</code> (and allocate memory to it) or a <code>double pointer</code> ? Can someone explain in detail,what happens inside,why a method is better than the other one ?</p>