title: Fill 2D array with numbers in C
body: <p>sI need to make simple 2D array of defined size and fill it with numbers starting from 1, any ideas? thanks </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
     int mat[][],  a, b, c, d;
  
     printf("Number of rows and cumluns?\n");
     scanf("%d%d", &amp;a, &amp;b);
     /* zadam 3 a 4*/
     for (c = 0; c &lt; a; c++)
        for (d = 0; d &lt; b; d++)
           mat[c][d]
  
     return 0;
  }
  </code></pre>