#include "syscall.h"Go to the source code of this file.
Functions | |
| int | main () |
Variables | |
| int | A [1024] |
|
|
Definition at line 15 of file sort.c.
00016 {
00017 int i, j, tmp;
00018
00019 /* first initialize the array, in reverse sorted order */
00020 for (i = 0; i < 1024; i++)
00021 A[i] = 1024 - i;
00022
00023 /* then sort! */
00024 for (i = 0; i < 1023; i++)
00025 for (j = i; j < (1023 - i); j++)
00026 if (A[j] > A[j + 1]) { /* out of order -> need to swap ! */
00027 tmp = A[j];
00028 A[j] = A[j + 1];
00029 A[j + 1] = tmp;
00030 }
00031 Exit(A[0]); /* and then we're done -- should be 0! */
00032 }
|
|
|
Definition at line 12 of file sort.c. Referenced by main. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002