Bubble sort is the simplest sorting algorithm. In this technique we follow given step to short given elements in increasing order.
http://www.tutorial4us.com/data-structure/c-bubble-sort
Bahare Shariat Jild 4 By SadurshSharia Mufti Amjad Ali Azmi
Bubble sort
1. /*** program of bubble sort ****
* http://www.tutorial4us.com/data-structure/c-bubble-sort */
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
int i,a[100],temp,j,no;
clrscr();
printf("How many no. do u want to insert: ");
scanf("%d",&no);
printf("nEnter any %d num in array n",no);
for(i=0;i<no;i++)
{
scanf("%d",&a[i]);
}
printf("nnnData before sorting : ");
for(j=0;j<no;j++)
{
delay(200);
printf(" %d",a[j]);