i have some error but i can't find it. please help!
Sorting.c: In function ‘bubble’:
Sorting.c:5: error: stray ‘\302’ in program
Sorting.c:5: error: stray ‘\240’ in program
Sorting.c:5: error: stray ‘\302’ in program
Sorting.c:5: error: stray ‘\240’ in program
Sorting.c:5: error: stray ‘\302’ in program
Sorting.c:5: error: stray ‘\240’ in program
Sorting.c:5: error: stray ‘\302’ in program
Sorting.c:5: error: stray ‘\240’ in program
Sorting.c:6: error: stray ‘\302’ in program
Sorting.c:6: error: stray ‘\240’ in program
Sorting.c:6: error: stray ‘\302’ in program
Sorting.c:6: error: stray ‘\240’ in program
Sorting.c:6: error: stray ‘\302’ in program
Sorting.c:6: error: stray ‘\240’ in program
Sorting.c:6: error: stray ‘\302’ in program
Sorting.c:6: error: stray ‘\240’ in program
Sorting.c:7: error: stray ‘\302’ in program
Sorting.c:7: error: stray ‘\240’ in program
Sorting.c:7: error: stray ‘\302’ in program
Sorting.c:7: error: stray ‘\240’ in program
Sorting.c:7: error: stray ‘\302’ in program
Sorting.c:7: error: stray ‘\240’ in program
Sorting.c:7: error: stray ‘\302’ in program
Sorting.c:7: error: stray ‘\240’ in program
Sorting.c:7: error: stray ‘\302’ in program
Sorting.c:7: error: stray ‘\240’ in program
Sorting.c:7: error: stray ‘\302’ in program
Sorting.c:7: error: stray ‘\240’ in program
Sorting.c:8: error: stray ‘\302’ in program
Sorting.c:8: error: stray ‘\240’ in program
Sorting.c:8: error: stray ‘\302’ in program
Sorting.c:8: error: stray ‘\240’ in program
Sorting.c:8: error: stray ‘\302’ in program
Sorting.c:8: error: stray ‘\240’ in program
Sorting.c:8: error: stray ‘\302’ in program
Sorting.c:8: error: stray ‘\240’ in program
Sorting.c:8: error: stray ‘\302’ in program
Sorting.c:8: error: stray ‘\240’ in program
Sorting.c:8: error: stray ‘\302’ in program
Sorting.c:8: error: stray ‘\240’ in program
Sorting.c:9: error: stray ‘\302’ in program
Sorting.c:9: error: stray ‘\240’ in program
Sorting.c:9: error: stray ‘\302’ in program
Sorting.c:9: error: stray ‘\240’ in program
Sorting.c:9: error: stray ‘\302’ in program
Sorting.c:9: error: stray ‘\240’ in program
Sorting.c:9: error: stray ‘\302’ in program
Sorting.c:9: error: stray ‘\240’ in program
Sorting.c:9: error: stray ‘\302’ in program
Sorting.c:9: error: stray ‘\240’ in program
Sorting.c:9: error: stray ‘\302’ in program
Sorting.c:9: error: stray ‘\240’ in program
Sorting.c:10: error: stray ‘\302’ in program
Sorting.c:10: error: stray ‘\240’ in program
Sorting.c:10: error: stray ‘\302’ in program
Sorting.c:10: error: stray ‘\240’ in program
Sorting.c:10: error: stray ‘\302’ in program
Sorting.c:10: error: stray ‘\240’ in program
Sorting.c:10: error: stray ‘\302’ in program
Sorting.c:10: error: stray ‘\240’ in program
Sorting.c:10: error: stray ‘\302’ in program
Sorting.c:10: error: stray ‘\240’ in program
Sorting.c:10: error: stray ‘\302’ in program
Sorting.c:10: error: stray ‘\240’ in program
Sorting.c:11: error: stray ‘\302’ in program
Sorting.c:11: error: stray ‘\240’ in program
Sorting.c:11: error: stray ‘\302’ in program
Sorting.c:11: error: stray ‘\240’ in program
Sorting.c:11: error: stray ‘\302’ in program
Sorting.c:11: error: stray ‘\240’ in program
Sorting.c:11: error: stray ‘\302’ in program
Sorting.c:11: error: stray ‘\240’ in program
Sorting.c:11: error: stray ‘\302’ in program
Sorting.c:11: error: stray ‘\240’ in program
Sorting.c:12: error: stray ‘\302’ in program
Sorting.c:12: error: stray ‘\240’ in program
Sorting.c:12: error: stray ‘\302’ in program
Sorting.c:12: error: stray ‘\240’ in program
Sorting.c:12: error: stray ‘\302’ in program
Sorting.c:12: error: stray ‘\240’ in program
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#include <stdio.h>
void bubble(int *data, int count){
int i, last;
for (last = count-1; last > 0; last--){
for (i = 0; i < last; i++)
if (data[i+1] < data[i]){
// Swap adjacent elements
int t = data[i+1];
data[i+1] = data[i];
data[i] = t;
}
}
}
int main(void){
int needToBeSorted[] = {456,2,457,34,1,9,36,97,344,38,23,76,54,62,6};
int count =15;
int *p;
p=&needToBeSorted;
bubble(int p,int count);
return 1;
}.
| |