implementation of some regular sorting methods with C