Your code has the following issues: You tried to use element value as array index, which was certainly wrong. You pass a[0] and a[25] as index into quick_sort function, however, low and high should be integer type, not char. You cannot use char value as index since the array values are out of order initially, while array indices are not.
Correct code should be the following:
int split(char a[], int low, int high) //should be integer type for low and high
{
char part_element = a[low];
//if low is a char, what is a[char]? It will not be the value you intended to want
//do same thing in your code
}
void quick_sort(char a[], int low, int high)
{
int middle; //not char
//do same thing as in your code
}
In main(), function call should be:
quick_sort(unsorted_alphabet,0,25); //should pass array indices
It actually works fine after these minor changes: I got:
Quick Sort: 20
ABCDEFGHIJKLMNOPQRSTUVWXYZ