Page Stats
Visitor: 791
C-Language Sorting
Sorting is technique which is used to arrange the data in a particular order, either ascending or descending order. In C-Language, there are 3 types of sorting techniques i.e. Bubble Sort, Selection Sort, Insertion Sort.
Bubble Sort
1. Bubble Sort - It starts comparing numbers from starting till end of the list and place a largest number in the end in the 1st pass.
Selection Sort
2. Selection Sort - It starts comparing numbers from top and place a smallest number in starting in 1st pass.
Insertion Sort
3. Insertion Sort- It starts comparing numbers from 1st index to top of the list and insert the number at its sorted position.
Exercise Question on Sorting
- WAP to input 5 numbers in 2 different arrays and Merge it in sorted order. Assuming that input numbers are not in sorted order.