Data Structures Lab Manual / Data Structures Selection Sort C Program

Program Name: Write a C Program for Selection Sort in Data Structures
Theory
In selection sort the first smallest element is placed at the first position 
and then second smallest element is selected and placed in the second position
of the array like this the process continues till all entire array got sorted.
Program Code



Input:
Enter Number of Elements: 5
Enter Array Elements: 5 7 9 2 1
Output:
Data After Bubble Sort: 	1	2	5	7	9
Data After Selection Sort: 	1	2	5	7	9


Home     Back