Home > Back-end >  @ C a great god, please analysis the following program run the process, thank you!
@ C a great god, please analysis the following program run the process, thank you!

Time:09-16

# include
# include
Void the sort (int arr [], int n)

{
Int I, j, k, t;
for(i=0; I {
K=I;
For (j=I + 1; J If (arr [j] T=arr [k].
Arr=arr [k] [I];
Arr [I]=t;
}
}
Void main ()
{
int i;
Int a []={5,6,8,3,4,2};
For (I=0; I <6; I++)
Printf (" % d ", a [I]);
printf("\n");
Sort (a, 6);
For (I=0; I <6; I++)
Printf (" % d ", a [I]);
  • Related