0

```
void quick(int a[],int m,int n)
{
int k,key,i,j;
if(m < n)
{
k=(m+n)/2;
swap(a[m],a[k]);
key=a[m];
i=m+1;
j=n;
while(i<=j)
{
while((i<=n)&&(a[i]<=key))
i++;
while((j>=m)&&(a[i]>key))
j--;
if(i<j)
swap(a[i],a[j]);
}
swap(a[m],a[j]);
quick(a,m,j-1);
quick(a,j+1,n);
}
}
```

I am getting a segmentation problem in swap(a[m].a[k]);

Please explain.