title: Passing two dimensional array in a function as parameter
body: <pre><code>#include&lt;stdio.h&gt;
  
  void print(int r, int c, int Ar[][c])
  {
      int i,j;
      printf(&quot;\n&quot;);
      for(i=0;i&lt;r;i++)
      {
          for(j=0;j&lt;c;j++)
          printf(&quot;%d &quot;,Ar[i][j]);
          printf(&quot;\n&quot;);
      }
  }
  
  int main()
  {
    int m,n,i,j;
    int A[100][100];
   
    printf(&quot;Enter number of rows and columns matrix: &quot;);
    scanf(&quot;%d%d&quot;, &amp;m, &amp;n);
    printf(&quot;Enter elements of first matrix:\n&quot;);
    for (i=0;i&lt;m;i++)
    {
      for (j=0;j&lt;n;j++)
      scanf(&quot;%d&quot;,&amp;A[i][j]);
    }
    print(m,n,A);
    return 0;
  }
  </code></pre>
  <p>Output:
  Enter number of rows and columns matrix:2 3
  Enter elements of first matrix:
  2 1 3
  5 4 6</p>
  <p>2 1 3
  0 0 0</p>
  <p>Why it's not printing the second line ?</p>