confusion with the following selection sort code :     int i,j,t;

        for(i=0;i<n-1;i++)

        {
          for(j=i+1;j<n;j++)

          {
              if(a[i]>a[j])
             {
               t=a[i]; 
               a[i]=a[j]; 
               a[j]=t;
              }
            }
           }  

My question is whether the above code is correct selection sort code or not? Got this code in various book. if it is incorrect then please explain reason. 