Selection Sort DAA Program in C language - Downloadppts.com - Paper Presentations

May 14, 2020

Selection Sort DAA Program in C language

DAA subject Selection sorting c program, Selection sort Daa lab programs, Program to perform Selection sorting using C lang

#include<stdio.h>
#include<conio.h>
 void main()
{
clrscr();
int i,position,swap,a[100],d,n;
printf("Enter The No. Of Elements\n");
scanf("%d",&n);
printf("Enter %d Integers\n",n);
for(i=0;iarray[d])
position=d;
}
if(position!=i)
{
swap=a[i];
a[i]=a[position];
a[position]=swap;
}
}
printf("Sorted List in Ascending Order is:\n");
for(i=0;i<=n;i++)
{
printf("%d\t",a[i]);
}
getch();
}

OUTPUT
www.jntuhelp.com

No comments:

Post a Comment