I understand the basic idea that when an array is the sole operand of the & or sizeof() operator, it decays to a pointer to the first element in the array. I'm unsure how these notations work though. In our text, there is the 1-D case, vs the 3-D case for an array. The first example is the function declaration for a function called average. The 1-D case is
double average(double set[]) or
double average(double *set)
Those make sense to me. The equivalent multi-D case does not. Their declaration is
double average (double set[][DIM1][DIM2]) or
double average (double (*set)[DIM1][DIM2])
Similarly, the function declaration for printing a value for 1-D is:
double *printvalue(double value)
The multi-D case is:
double (*printvalue(double value))[DIM1][DIM2]
Can anyone shed any light on this? Thanks.