Hey I am a student and i m performing selection sort in this way.
Is it proper way or not? if it is not proper, explain it why with reason.
#include<stdio.h>
#include<conio.h>
void selection(int a[],int n)
{
int i,j,temp;
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{
if(a[i]>a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=a[i];
}
}
}
}