diff --git a/cv10/program.c b/cv10/program.c index 387e704..9776b0e 100644 --- a/cv10/program.c +++ b/cv10/program.c @@ -42,7 +42,8 @@ int main() { num_students++; } - // sort the names by alphabet + names[num_accepted][0] = '\0'; + qsort(names, num_accepted, sizeof(char*) * NAME_SIZE, compare_names); if (num_accepted == 0) {