#include<stdio.h>
void print(int r, int c, int Ar[][c])
{
int i,j;
printf("\n");
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
printf("%d ",Ar[i][j]);
printf("\n");
}
}
int main()
{
int m,n,i,j;
int A[100][100];
printf("Enter number of rows and columns matrix: ");
scanf("%d%d", &m, &n);
printf("Enter elements of first matrix:\n");
for (i=0;i<m;i++)
{
for (j=0;j<n;j++)
scanf("%d",&A[i][j]);
}
print(m,n,A);
return 0;
}
Output: Enter number of rows and columns matrix:2 3 Enter elements of first matrix: 2 1 3 5 4 6
2 1 3 0 0 0
Why it's not printing the second line ?
Ar[][c]toAr[][100]