I have an array int arr[5] that is passed to a function fillarr(int arr[]):
int arr[5]
fillarr(int arr[])
int fillarr(int arr[]) { for(...); return arr;
Here's a full example of this kind of problem to solve
#include using namespace std; int* solve(int brr[],int n) { sort(brr,brr+n); return brr; } int main() { int n; cin>>n; int arr[n]; for(int i=0;i>arr[i]; } int *a=solve(arr,n); for(int i=0;i