A simple sorting technique that scans the sorted list, starting at the beginning, for the correct insertion point for each of the items from the unsorted list… Read more »
program
C Program for BUBBLE SORT
#include <stdio.h>
int main()
        {
        int array[100], n, c, pass,i,j,k, swap;
        clrscr();
        printf("Enter number of elements\n");
        scanf("%d", &n);
printf("Enter %d integers\n", n);
 for (c = 0; c < n; c++)
        {
        scanf("%d", &array[c]);
        }
        printf("\n\n Given Input:");
        for ( c=0; c < n; c++)
        {
        printf("%d  ",array[c]);
        }
        printf("\n\n  Number of Passes : %d", n-1);
        for (pass = 0 ; pass < ( n - 1); pass++)
        {
        printf("\n\n PASS %d:",pass);
        //   printf("\n ********");
        for (i = 0 ; i < (n - pass) - 1; i++)
        {
 printf("\n\n\t %d th iteration:",i);
        //  printf("\n\n\t ~~~~~~~~~~~~~~~~");
        printf("\n\n\t\t Comparison elements: %d   %d " ,i,array[i],array[i+1]);
        if (array[i] > array[i+1]) /* For decreasing order use < */
        {
        swap       = array[i];
        array[i]   = array[i+1];
        array[i+1] = swap;
        }
 printf("\n\n\t\t After the %d th iteration: %d   %d  ", i,array[i],array[i+1]);
        printf("\n\n\t\t Ans:");
        for ( j = 0 ; j < n ; j++ )
        {
        printf(" %d  ", array[j]);
        }
 }
        printf("\n\n Result for PASS %d: ",pass);
        for ( k = 0 ; k < n ; k++ )
        {
        printf(" %d  ", array[k]);
        }
}
 printf("\n\n Sorted list in ascending order");
        printf("\n ******************************\n");
        for ( c = 0 ; c < n ; c++ )
        {
        printf("%d\n", array[c]);
        }
        getch();
        return 0;
        }
          
          
      
Sorting by MS.K.Abirami
- 
	BUBBLE SORTBubble sort is a sorting algorithm that works by repeatedly stepping through lists that need to be sorted, comparing each pair of adjacent items and swapping them ...Read more » 
- 
	INSERTION SORTSELECTION SORTIt starts by comparing the entire list for the lowest item and moves it to the #1 position. It then compares the rest of the list for the next-lowest item....Read more » QUICK SORTA sorting technique that sequences a list by continuously dividing the list into two parts and moving the lower items to one side and the higher items to the other. … Read more » BUBBLE SORTThe number of comparison between elements and the number of exchange between elements determine the efficiency of Bubble Sort algorithm.Read more » Insertion SORTInsertion sort is also a time taking technique as its complexity is O(n2)Read more » selection SORTThe number of comparison between elements and the number of exchange between elements determine the efficiency of Bubble Sort algorithm.Read more » quick SORTThe efficeieny of the quicksort depends on the pivot element. However the pivot element can also be choosen at random order or from the last element of the array