Sorting Idea is to rearrange the data in an array so it is either in increasing or decreasing order. For example: 5 15 12 30 50 40 90 70 80 would be changed to 5 12 15 30 40 50 70 80 90 Process is the following: For each position from the first (element [0]) to next to last (element array_size-1) 1. Find the smallest value left in the unsorted section of the array. 2. Switch it with the value at the current position. Example: 5 15 12 30 50 40 90 70 80 unsorted section begins at position 0. Smallest value is 5. Switch it with itself. 5 15 12 30 50 40 90 70 80 unsorted section begins at position 1. Smallest value is 12. Switch it with 15. 5 12 15 30 50 40 90 70 80 unsorted section begins at position 2. Smallest value is 15. Switch it with itself. 5 12 15 30 50 40 90 70 80 unsorted section begins at position 3. Smallest value is 30. Switch it with itself. 5 12 15 30 50 40 90 70 80 unsorted section begins at position 4. Smallest value is 40. Switch it with 50. 5 12 15 30 40 50 90 70 80 Code this as a function: void select_sort(int list[], int size) { int start; int temp; for (start = 0; start < size-1; start++) { /* find smallest in unsorted section */ min_pos = find_min_sub(list, start, size-1); /* switch smallest with value at start */ temp = list[start]; list[start] = list[min_pos]; list[min_pos] = temp; } }