Suppose i have two dimentional array like this:
A[2][3] = {{1,2,4},{2,5,15}}
and if i were to pass it as a function argument
#include <stdio.h>
int fun(int A[][3]) // or int fun( int (*A)[3])
{
.
.
}
main()
{
int A[2][3] = {{1,2,4},{2,5,15}};
fun(A);
}
Q) Why is this first block can be empty in function argument like this [] and it can stay empty why can't others stay empty as well like A[][] ? Or why this is wrong **A as a function argument?
Now if i have a three dimentional array like this:
A[2][3][4] = {{{2,21,12,34,23},{322,34,34,23},{323,32,112,324}}, {{23,231,21,233},{23,5,65,2},{3,23,234,34}}}
and if i were to pass it as a function argument
#include <stdio.h>
int fun(int A[][3][4]) // or int fun( int (*A)[3][4])
{
.
.
}
main()
{
int A[2][3][4] = {{{2,21,12,34,23},{322,34,34,23},{323,32,112,324}}, {{23,231,21,233},{23,5,65,2},{3,23,234,34}}}
fun(A);
}
Q) Why is this first block can be empty in function argument like this [] and it can stay empty why can't others stay empty as well like A[][][] ? Or why this is wrong ***A as a function argument?