/** * ith-smallest.h * A declaration of the ith_smallest procedure. */ #ifndef __ITH_SMALLEST__ #define __ITH_SMALLEST __ /** * Procedure: * ith_smallest * Parameters: * strings, an array of strings * size, a positive integer * i, a positive integer * Purpose: * Find the ith smallest element of strings. * Produces: * ith, a string * Preconditions: * strings contains at least size values. * strings contains no duplicate values. * 0 <= i < size * Postconditions: * ith is an element of strings. That is, for some j, ith = strings[j]. * There are exactly i values, v, in strings that alphabetically * precede ith. * The values in strings may have been rearranged. */ char *ith_smallest (char *strings[], int size, int i); #endif // __ITH_SMALLEST__