the specific reason is that, except when used as the argument to operator& or sizeof(), array expressions are converted to a pointer to their first element.This is handy for C's function calling rules, which do not allow array types to be passed to, or returned from functions.

If the function does not know the dimensions you will need to pass those in, and if you have an arbitrary number of dimensions those need to be passed in an array along with another count of the number of dimensions.