merge sort program not working

i made the following merge sort program but it is not working at all. it just displays the original array. pl help

#include <iostream>

using namespace std;
void sort(int *,int *,int *);
void merge(int *);
int main()
{
    int n;
    cout<<"enter the number of elements \n";
    cin>>n;
    int * arr;
    arr=new int[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    merge(arr);
    for(int i=0;i<n;i++)
    {
        cout<<arr[i]<<" ";
    }
}
void sort(int *arr,int *l,int *r)
{
    int ls,rs;
    ls=sizeof(l)/sizeof(l[0]);
    rs=sizeof(r)/sizeof(r[0]);
    int i,j,k;
    i=j=k=0;
    while(i<ls && j<rs)
    {
        if(l[i]<r[j])
        {
            arr[k]=l[i];
            i++;
        }
        else
        {
            arr[k]=r[j];
            j++;
        }
        k++;
    }
    while(i<ls)
    {
        arr[k]=l[i];
        i++;
        k++;
    }
    while(j<rs)
    {
        arr[k]=r[j];
        j++;
        k++;
    }
}
void merge(int * arr)
{
    int n;
    n=sizeof(arr)/sizeof(arr[0]);
    if(n<2)
    {
        return;
    }
    int mid;
    mid=n/2;
    int l[mid],r[n-mid];
    for(int i=0;i<mid;i++)
    {
        l[i]=arr[i];
    }
    for(int i=mid;i<n;i++)
    {
        r[i]=arr[i];
    }
    merge(l);
    merge(r);
    sort(arr,l,r);

}

sizeof(arr) - returns 8 always. This is because size of a pointer = number of bytes to represent an address => 64 bit => 8 bit.

If you want to send pointer then you need to send size of the array as another parameter necessarily.

ok i got answer. solved it myself. here is the updated code

#include <iostream>


using namespace std;

void mrg(int *,int *,int *,int,int);
void srt(int *,int);



int main()
{
    int n;
    cout<<"enter the number of elements \n";
    cin>>n;
    int *arr;
    arr=new int[n];
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    srt(arr,n);
    for(int i=0;i<n;i++)
    {
        cout<<arr[i]<<" ";
    }
    
}



void mrg(int arr[],int larr[],int rarr[],int mid,int n)
{
    int i,j,k;
    i=j=k=0;
    while(i<mid && j<n-mid)
    {
        if(larr[i]<rarr[j])
        {
            arr[k]=larr[i];
            i++;
        }
        else
        {
            arr[k]=rarr[j];
            j++;
        }
        k++;
    }
    while(i<mid)
    {
        arr[k]=larr[i];
        i++;
        k++;
    }
    while(j<n-mid)
    {
        arr[k]=rarr[j];
        j++;
        k++;
    }
}



void srt(int arr[],int n)
{
    if(n<2)
    {
        return;
    }
    int mid=n/2;
    int larr[mid],rarr[n-mid];
    for(int i=0;i<mid;i++)
    {
        larr[i]=arr[i];
    }
    for(int i=mid;i<n;i++)
    {
        rarr[i-mid]=arr[i];
    }
    srt(larr,mid);
    srt(rarr,n-mid);
    mrg(arr,larr,rarr,mid,n);
}