Probably one of the poorest sorting algorithms ever written but I provide it here and anyone who wants to use it can use it in any way he/she wants :P ...
Usage: bubble_sort(your_array, number_of_elements);
int arr[] = {52,85,2,1,-56,802};
bubble_sort(arr, 6); /* order of elements in arr: {-56, 1, 2, 52, 85, 802} */