Suppose I have an array
int arr[] = {...}; arr = function(arr);
I have the function as
int& function(int arr[]) { //
Well, arr is compatible with int*, not int&. Your code won't compile. Perhaps you wanted return arr[0]?
int*
int&
return arr[0]