Merge two sorted subarrays

Write a function to sort 2 subarrays that are already sorted

Merge two sorted subarrays

int* MergeArrays(int* smaller,int * larger, int i,int j)
{

int * s;
int * l;
int noElements;
noElements=j-i;

while(i>0)
{
if(smaller[i-1]