资 源 简 介
Consider four sort methods - Stooge sort, Selection sort, Quick sort,Merge sort.
Created a sort library that provides each of the above sort procedures for following datatypes - int, float, char, a struct containing 1 char, 1int, 1 float.
The C file containing the main() function is generated as per the options given to make. In general, this file would include :
The sort header file to include according to DTYPE.
Declare a static array of type DTYPE & size ARRSIZE.
Populate the array from the
whose name is
passed to it as command line argument.
Call the appropriate sort procedure(s), time them, write
sorted output to
.out as necessary.
Application specific variables to include in Makefile :
1. DTYPE := int (default) or float or char or struct- Denotes the
data type of the input.
2. ARRSIZE - (default = 1) Denotes the size of the input array.
Needs to be used in static array declaration.
3. SORTBY := int(def