int array[][2] = {
{1,0},
{2,2},
{3,4},
{4,17}
};
int main()
{
/* calculate array size */
printf(" => number of positions to capture : %d", (int)(sizeof(array)/sizeof(array[0])));
func(array);
return 0;
}
void func(int actu[][2])
{
/* calculate array size */
printf(" => number of positions to capture : %d", (int)(sizeof(actu)/sizeof(actu[0])));
}
Result:
=> number of positions to capture : 4 -- inside main
=> number of positions to capture : 0 -- inside func -- I believe I should get 4 here too
Size of a same arrray in calling and called function are giving different values. Please, help me to find the issue.