Initialization
This commit is contained in:
parent
d9f4958390
commit
37b488a493
@ -40,16 +40,20 @@ int main() {
|
||||
num_students++;
|
||||
}
|
||||
|
||||
// Add a null character at the end of the names array
|
||||
names[num_accepted][0] = '\0';
|
||||
|
||||
qsort(names, num_accepted, sizeof(names[0]), compare);
|
||||
|
||||
if (num_accepted == 0) {
|
||||
printf("Ziadne prihlasky");
|
||||
} else {
|
||||
qsort(names, num_accepted, sizeof(names[0]), compare);
|
||||
printf("Prijati studenti:\n");
|
||||
for (int i = 0; i < num_accepted; i++) {
|
||||
printf("%s", names[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// if (num_accepted < num_students) {
|
||||
// printf("Neprijati studenti:");
|
||||
// for (int i = 0; i < max_students; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user