Initialization
This commit is contained in:
parent
f06f7126b3
commit
6c24ae9803
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user