Pass an array to a function by value
Because the array is being passed by value, an exact copy of the array is made and placed on the stack. This is incorrect: the array itself is not being copied, only a copy of the pointer to its address is passed to the callee (placed on the stack). (Regardless of whether you declare the … Read more