Initialization

This commit is contained in:
Kozar 2024-04-25 20:02:38 +02:00
parent 3ed02a3922
commit 7760084e5a

View File

@ -50,15 +50,16 @@ int main() {
// Sort the applications alphabetically
qsort(applications, i, sizeof(char *), compare_names);
printf("Prijati studenti:");
j = 0;
while (j < i) {
printf("Prijati studenti:\n");
for (j = 0; j < i; j++) {
printf("%s\n", applications[j]);
j++;
}
if (count < i) {
printf("Neprijati studenti:\n");
for (; j < i; j++) {
printf("%s\n", applications[j]);
}
}
// Free allocated memory
@ -68,4 +69,4 @@ int main() {
free(applications);
return 0;
}
}