Initialization

This commit is contained in:
Kozar 2024-04-25 17:37:53 +02:00
parent f06f7126b3
commit 6c24ae9803

View File

@ -40,9 +40,12 @@ int main() {
num_accepted++; num_accepted++;
} }
num_students++; num_students++;
}
names[num_accepted][0] = '\0'; // Check if we have reached the maximum number of accepted students
if (num_accepted == max_students) {
break; // Exit the loop
}
}
qsort(names, num_accepted, sizeof(char*) * NAME_SIZE, compare_names); qsort(names, num_accepted, sizeof(char*) * NAME_SIZE, compare_names);