void swap4(int arr[], int x, int y)
{
int temp = arr[x];
arr[x] = arr[y];
arr[y] = temp;
}
void quick_order(int arr[], int x)
{
int i = 0;
for (i; i < x; i++)
{
int temp = i;
int j = i;
for (j; j < x; j++)
{
if(arr[j]<arr[temp])
{
temp = j;
}
}
swap4(arr,i,temp);
}
}
void Print(int* arr, int x)
{
int i = 0;
for (i; i < x; i++)
{
printf("%4d", *(arr + i));
}
}
int main()
{
int arr[] = { 1,3,4,6,2,9,7,8,11 };
int len = sizeof(arr) / sizeof(arr[0]);
quick_order(arr, len);
Print(arr, len);
return 0;
}