Why is address of array-typed variable different when it is local vs when it is a function argument?
We are taught from an early age that the name of an array-typed variable yields the address of it’s zeroth element, and that taking the address of that name yields the same address, but with a different pointer type (the type of the whole array rather than the type of a single element). However, this is not true if the array-typed variable is a function argument. In this case “&” yields the address on the stack when the address of the passed-in array is stored, as if the argument was declared “X* x” rather than “X x[]”. Why is this?