I have to print pointer parameters in ascending order and I was trying to use bubble sort algorithm, but the compiler doesn't sort in the right order. I'm only allowed to use one function.
void sort3(int *a, int *b, int *c){   
        int array[3]= {*a, *b, *c};
        int temp, i,j;
        for(i=0;i<3;i++){
            for(j=0;j<3-1;j++){
                if(array[j]>array[j+1]){
                    temp=array[j];
                    array[j]=array[j+1];
                    array[j+1]=temp;
                }
            }
        }
    }
 
    