Professional Documents
Culture Documents
Bubble Sort Technique
Bubble Sort Technique
Bubble Sort Technique
2
To be precise, we are now showing how an array should
look like after each iteration. After the second iteration, it
should look like this −
3
Ascending and Descending Order using Data
Structure Bubble Sort technique.
#include <stdio.h>
int main()
{
int arr[MAX],limit;
int i,j,temp;
/*Read array*/
printf("Enter array elements: \n");
for(i=0; i<limit; i++)
{
printf("Enter element %3d: ",i+1);
scanf("%d",&arr[i]);
}
4
printf("\n");
printf("\n");
return 0;
}