Initialization
This commit is contained in:
parent
134344fe10
commit
70ce17da57
@ -15,11 +15,9 @@ int main() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Initialize the names array to all-zero strings
|
||||
memset(names, 0, sizeof(names));
|
||||
|
||||
while (fgets(temp_name, sizeof(temp_name), stdin) != NULL && num_accepted < max_students) {
|
||||
// Remove newline character from temp_name
|
||||
|
||||
int i, found = 0;
|
||||
|
||||
@ -42,9 +40,6 @@ int main() {
|
||||
printf("Prijati studenti:\n");
|
||||
for (int i = 0; i < num_accepted; i++) {
|
||||
printf("%s", names[i]);
|
||||
if (i < num_accepted - 1) {
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user