冒泡排序
void bubbleSearch(int arr[],int arrLen);
void main(){
int arr[]={3,,9,-1,10,-2,-11};
int arr Len=sizeof(arr)/sizeof(int);
int j;
bubbleSearch(arr,arrLen);
printf("\n 排序后(函数)\n");
for(j=0;j<arrLen;j++){
printf("%d",arr[j]);
}
}
==================================
void bubbleSort(int arr[],int arrLen){
int j,i,t;
for(i=0;i<arrLen-1;i++){
if(arr[j]>arr[j+1]){
t=arr[j];
arr[j]=arr[j+1];
arr[j+1]=t;
}
}
}