i built this code exactly like in the theory

the min function works

where is the problem

why its not sorting

??

Code:

#include <stdio.h>
int min( int num[], int i, int j );
void swap(int num[],int i,int j);
void selection_sort(int arr[], int size);
void selSort(int array[], int i,int length);
int main()
{
int array[3];
array[0]=2;
array[1]=6;
array[2]=3;
selection_sort(array,3);
printf("%d,%d,%d\n",array[0],array[1],array[2]);
return 0;
}
void selection_sort(int arr[], int size){
selSort(arr,0,size);
}
void selSort(int array[], int i,int length)
{
if (i<length)
{
swap(array,i,min(array,0,i));
selSort(array,i+1,length);
}
}
int min( int num[], int i, int j )
{
if ( i > 0 )
{
if ( num[i-1] < j )
{
return min( num, i-1, num[i-1] );
}
else
{
return min( num, i-1, j);
}
}
else
{
return j;
}
}
void swap(int num[],int i,int j)
{
int temp;
temp=num[i];
num[i]=num[j];
num[j]=temp;
}