# 冒泡法排序大小

4286
3185
2895
3550
2745
按从小到大排序

## template

```cpp
#include <stdio.h>
#define ARR_LEN 255 
#define elemType int 
void bubbleSort (elemType arr[], int len) {
	elemType temp;
	int i, j;
	for (i=0; i<len-1; i++) 
		for (j=0; j<len-1-i; j++) { 
			if (arr[j] > arr[j+1]) { 
				temp = arr[j];
				arr[j] = arr[j+1];
				arr[j+1] = temp;
			}
		}
}
int main (void) {
	elemType arr[ARR_LEN] = {4286,3185,2895,3550,2745};
	int len = 5;
	int i;
	bubbleSort (arr, len);
	for (i=0; i<len; i++)
		printf ("%d\t", arr[i]);
	putchar ('\n');
	return 0;
}
```

## 答案

```cpp

```

## 选项

### A

```cpp

```

### B

```cpp

```

### C

```cpp

```