Despite how it appears, a complete array cannot be passed to a function - just a pointer to its first element.

Question 6.21

Also, which approach should I take to avoid this?
It's good practice to pass the size of the array to the function along with the array itself.