void bubble_sort(int *idx, int n_idx, int *buf)
{
        int i, j, tmp;


        for_ij { sort(idx[j], idx[i]);          }
        for_ij { sort(buf[idx[j]], buf[idx[i]]);}


}

int main()
{
        int values[] = {7, 6, 5, 4, 3, 2, 1, 0};
        int idx[] = {6, 1, 7};
        int i;

        printf();
        for (i = 0; i < 8; i++)
                printf(, values[i]);

        printf();
        bubble_sort(idx, 3, values);

        for (i = 0; i < 8; i++)
                printf(, values[i]);
        printf();

        return 0;
}