quick sort: idk why this program is showing error
// Online C compiler to run C program online #include <stdio.h> int swap(int *x,int *y){ int temp; temp=*x; *x=*y; *y=temp; } int pivot(int arr[],int first,int last) { int pivot=arr[first]; int left=first+1; int right=last; while(left<right){ while(left<right && arr[left]<pivot){ left++; } while(left<right && arr[right]>pivot){ right--; } if(right<left)//done to isolate the break; else swap(&arr[left],&arr[right]); } swap(&arr[first],&arr[right]); return right; } int quick_sort(int arr[],int first,int last) { int p=pivot(arr,first,last); quick_sort(arr,p+1,last); quick_sort(arr,first,p-1); } int main() { int a[]={19,23,7,21,27,17,30,3,1,15}; int size=sizeof(a)/sizeof(a[0]); quick_sort(a,0,size-1); return 0; }