An array as argument is actually a pointer. Arrays are automatically 'casted' to pointers if given as argument
You can't assign an array to another array in C/C++. You will have to use a memcpy or loop to copy the values.
If function changes the arr argument, it actually changes the value of the arr variable given by the caller. Again because the array is actually a pointer. So in the caller arr is assigned to arr, which is useless here.