From 2dd130805772c2139dbaf6b1f0b158c0b3e08029 Mon Sep 17 00:00:00 2001 From: ak643du Date: Mon, 22 Apr 2024 18:23:56 +0200 Subject: [PATCH] Initialization --- cv10/program.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cv10/program.c b/cv10/program.c index acabd87..82a5a63 100644 --- a/cv10/program.c +++ b/cv10/program.c @@ -46,10 +46,12 @@ int main() { if (num_accepted < max_students && num_accepted < num_students) { printf("Neprijati studenti:"); - for (int i = num_accepted; i < max_students; i++) { - printf("%s", names[i]); + for (int i = 0; i < max_students; i++) { + if (names[i][0] == '\0') { + printf("%s", names[i]); + } } } - + return 0; } \ No newline at end of file