I have:
void displayMatrix(int a[][]){
int howManyRows = sizeof(a)/sizeof(a[0]);
int howManyColumns = sizeof(a)/sizeof(int);
int r, c;
for (r = 0; r < howManyRows; r++){
if (r >= 1){
printf("\n");
}
for (c = 0; c < howManyColumns; c++){
printf("%d ",a[r][c]);
}
}
}
but when I create an array
int samp[4][5] = {
{1,2,3,4,5},
{6,7,8,9,10},
{11,12,13,14,15},
{16,17,18,19,20}
};
and pass it to the function in main, nothing shows up on the screen. What is going on?