C code for a bubble sort algorithm