grazie per le risposte lo swap l'ho capito, la funzione bubble un pò di meno,il codice corrispondente alla funzione è :
codice:
void bubble( int work[], const int size, int (*compare)( int a, int b ) )
{
   int pass; /* pass counter */
   int count; /* comparison counter */

   /* loop to control passes */
   for ( pass = 1; pass < size; pass++ ) {

      /* loop to control number of comparisons per pass */
      for ( count = 0; count < size - 1; count++ ) {

         /* if adjacent elements are out of order, swap them */
         if ( (*compare)( work[ count ], work[ count + 1 ] ) ) {
            swap( &work[ count ], &work[ count + 1 ] );
         }
      }
   }
}
ho capito che int (*compare)( int a, int b ) è la "dichiarazione" del puntatore a funzione che riceve i due parametri a,b. Non mi è tanto chiaro la condizione(If)