/** * ith-cmd * One of those "Get the ith largest from the command line" tests. */ #include #include #include "ith-smallest.h" int main (int argc, char *argv[]) { // Sanity check if (argc == 1) { fprintf (stderr, "Usage: %s i str0 str1 ... strn\n", argv[0]); return 1; } int i = atoi (argv[1]); char *ith = ith_smallest (argv+2, argc-2, i); printf ("%s\n", ith); return 0; } // main