Level: Beginner
Compatibility:C
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description. 
#include 
#include 
void bubble_sort(int [],int); 
void main() { int a[30],n,i; 
printf("\nEnter no of elements :"); 
scanf("%d",&n); printf("\nEnter array elements :"); 
for(i=0; 
void bubble_sort(int a[],int n) { int i,j,k,temp; printf("\nUnsorted Data:"); for(k=0;ka[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } printf("\nAfter pass%d",i); for(k=0);
Simple Bubble Sort
Labels:
Script
 - Saturday, November 29, 2008
Subscribe to:
Post Comments (Atom)




0 comments:
Post a Comment