What you pass to the function is a pointer to the array, with no way to know the size. The size of a pointer is the size of an int, hence the 1.
You need to pass the size of the array along with it in the arguments of your function if you want to iterate on it.