i see you defined a max of 50 for int a[max] in int main(), but i dont believe that will stop anyone from entering a number higher than 50 for the size of the array.... also im pretty sure you can't call a function while within said function...
1 2 3 4 5 6 7 8 9 10
void qsort(int *arr,int left,int right)
{
if(right>left)
{
int p;
p=partition(arr,left,right);
qsort(arr,left,p-1); //not sure this flow would work
qsort(arr,p+1,right);
}
}