Help me in solving DSAAGP1094 problem

My issue

the answer is correct but still it is not accepting, showing compilation error

My code

int Search_Insert_Position(int arr[], int n, int k) {
int start = 0;
int end = n-1;
while(start <= end )
{
    int mid = start + (end-start)/2;
    if(arr[mid] > k)
    {
        end = mid - 1;
        
    }

    else if(arr[mid] < k)
    {
        start = mid + 1;
        
    }
     else
     {
         return mid;
         
     }
}
return start ;

}


Learning course: Data structures & Algorithms lab
Problem Link: https://www.codechef.com/learn/course/muj-aiml-dsa-c/MUJADSAC11A/problems/DSAAGP1094