I have written the following C99 code to perform a quicksort on a fixed array. However, after printing the initial array, it is giving a segmentation fault. I do not have any debugger right now, I am using KWrite and then terminal to compite and run. Here is the code.

```
#include <stdio.h>
#define LEN 8

int arr[8] = {3,5,7,1,2,4,6,8};

void printarr()
{
    printf("\n");
    for (int i = 0; i<LEN; i++)
        printf("\t %d", arr[i]);
    printf("\n");
}

void quicksort(int _left,int _right)
{
    int left = _left;
    int right = _right;
    int pivot = (left+right)/2;

    while (left<=right)
    {
        while(pivot>arr[left])
            left--;
        while (pivot<arr[right])
            right++;
        if(left<=right)
        {
            int temp = arr[right];
            arr[right] = arr[left];
            arr[left] = arr[temp];
            left++;
            right--;
        }
    }

    if (_left<right)
        quicksort(_left, right);
    else
        quicksort(left, _right);
}

int main()
{
    int left = 0, right = LEN-1;

    printf("Unsorted array:");
    printarr();

    quicksort(left,right);

    printf("Sorted array:");
    printarr();
}

```

Please have a look and let me know which part of the code is causing this issue.