© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies



C Program To Implement Selection Sort :

#include #include int n,i=0,j=0,t=0,k=0,a[30]; void main() { clrscr(); printf("\nEnter how many numbers you want to sort\n"); scanf("%d",&n); printf("\nEntyer the numbers \n"); for (i=0;i",i); t=a[i]; for(j=i-1;((j>=0)&&(t

Sample Input and Output:

Enter how many elements you want to sort

5

Enter the numbers
5
4
3
2
1

PASS->1  1 5 4 3 2
PASS->2  1 2 5 4 3
PASS->3  1 2 3 5 4
PASS->4  1 2 3 4 5

Final sorted list is 1 2 3 4 5

 
SLogix Student Projects

⇓Student Projects⇓
⇑Student Projects⇑
bottom