Suppose I have an array
int arr[] = {...}; arr = function(arr);
I have the function as
int& function(int arr[]) { //
Use std:: vector like this.
std::vector function(const std::vector& arr) { return arr; }
An array like
int arr[] = {...};
is not useful to be returned from a function because its not able to copy itself.