Edit:
=====
The first problem I found with your code was the assignment of low and high to a[0] and a[9]. Low and high, should be index numbers, not values. On your first call, since nothing has been partitioned yet, the low and high should be 0 and array size -1.
I changed a bunch of other variables, simply to save time.
#include<stdio.h>
//int low,high,mid; These should be local, not global variables
void partition(int a[],int low,int high);
void merge(int a[],int low,int high,int mid);
int main()
{
int a[10];
int count;
for(count=0; count<10; count++)
{
printf("Enter element number %d\n",count+1);
scanf("%d" , &a[count]);
}
partition(a,0,9);
for(count=0; count<10; count++)
{
printf("%d\n" ,a[count]);
}
return 0;
}
/*high is array[SIZE]-1 */
void merge(int a[],int low,int mid,int high)
{
int i,j,k,l,b[20];
l=low;
i=low;
j=mid+1;
while((l<=mid)&&(j<=high))
{
if(a[l]<=a[j])
{
b[i]=a[l];
l++;
}
else
{
b[i]=a[j];
j++;
}
i++;
}
if(l>mid)
{
for(k=j;k<=high;k++)
{
b[i]=a[k];
i++;
}
}
else
{
for(k=l;k<=mid;k++)
{
b[i]=a[k];
i++;
}
}
for(k=low;k<=high;k++)
{
a[k]=b[k];
}
}
void partition(int a[],int low,int high)
{
int mid;
if(low<high)
{
mid=(low+high)/2;
partition(a,low,mid);
partition(a,mid+1,high);
merge(a,low,mid,high);
}
}