I want to sort pointers that point to an array in C, but without moving index positions. Here is a picture of what I am trying to do:

Here is the code, but it doesnt work, and I dont know what the problem is.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int niz[7] = { 4, 2, 5, 7, 6, 1, 3};
int j,i;
int *temp;
int *nizptr = niz;
int **niz2ptr = &nizptr;
for(i = 0; i < 7; i++)
{
for(j = 0; j < 7; j++)
{
if( niz[i] < niz[j] )
{
temp = *(niz2ptr + i);
*(niz2ptr+i) = *(niz2ptr + j);
*(niz2ptr+j) = temp;
}
}
}
for(i = 0; i < 7; i++)
{
printf("%d",*(*(niz2ptr + i)));
}
return 0;
}

