1 #include <stdio.h>
 2 #include <stdlib.h>
 3
 4 int a[10] = {6,5,0,1,4,7,2,9,3,8};
 5 int *x, y , *indx, *end;
 6
 7
 8 int main(){
 9         end = (a + 9);
10         for( indx = a; indx <= end; indx++){
11                 for(x = a; x < end; x++){
12                         if( *x > *(x + 1)){
13                                 y = *x;
14                                 *x = *(x + 1);
15                                 *(x + 1) = y;
16                         }
17                 }
18         }
19
20         for( x=a; x < (end + 1); x++)
21                 printf ("%d \t", *x);
22
23         return 1;
24 }