IMPLEMENTATION OF SELECTION SORT
PROGRAM:
#include
#include
int n;
void main()
{
int a[10],i,j;
void selection(int a[10]);
clrscr();
printf("\n\t\tSelection Sort");
printf("\nHow many Elements are there");
scanf("%d",&n);
printf("\nEnter the element");
for(i=0;i
selection(a);
getch();
}
void selection(int a[10])
{
int i,j,min,temp;
for(i=0;i<=n-2;i++)
{
min=i;
for(j=i+1;j<=n-1;j++)
{
if(a[j]min=j;
}
temp=a[i];
a[i]=a[min];
a[min]=temp;
}
printf("\n Sorted List is\n");
for(i=0;i
}
OUTPUT:
Selection Sort
How many Elements are there 5
Enter the element
5
4
3
2
1
Sorted List is
1
2
3
4
5
CIET college Programs,LAB Programs for Engineering Students,DAA LAB Programs,DSA LAB Programs,Remoboys,karthik,Remokn,Student3k,programs source code,Design Analysis And Algorithms LAB Programs,Data Structures and Algorithms LAB Programs,LAB Codings,Coimbatore Institute of Engineering and Technology ( CIET )
Wednesday, September 22, 2010
IMPLEMENTATION OF SELECTION SORT PROGRAMs
9:30 AM
Karthikh Venkat
Popular Posts( Last 7 Days )
-
Nadunisi Naaygal download,Nadunisi Naaygal free Download,Nadunisi Naaygal TC Rip,Nadunisi Naaygal 700 MB,Nadunisi Naaygal free Download,Na...
-
Vinnai Thandi Varuvaya ~ Blu ray ~ Quality ~ Movie Download This image has been resized. Click this bar to view the full image. The or...
-
wwe wallpapers,wwe stills, wwe posters,wwe latest picture photo posters collections, batista latest pictures wallpapers posters news recent
-
Imsai arasan 23am pulikesi download,Imsai arasan 23am pulikesi Blu Ray Rip Download,Imsai arasan 23rd pulikesi High Quality Online Download...
-
Payanam,Payanam Untouched,Payanam good quality,Payanam high quality,Payanam 2011,Payanam download,Payanam HQ,Payanam free download,Payanam...
-
Mudhalvan 1999 Movie Blu Ray Free Download Muthalvan Blu Ray Tamil movie HQ Blu Ray Free Download. Mudhalvan 1999 Movie Blu Ray Free Downloa...