Aktualizovat a3/program.c
This commit is contained in:
parent
8e19c7fbab
commit
b201e9a3e8
10
a3/program.c
10
a3/program.c
@ -32,8 +32,8 @@ int main()
|
||||
}
|
||||
else if(sscanf(line, "%s", &processedName) == 1)
|
||||
{
|
||||
strcpy(student[i].meno, processedName);
|
||||
strncat(student[i].meno, &newLineSymbol, 1);
|
||||
strcpy(student[i].name, processedName);
|
||||
strncat(student[i].name, &newLineSymbol, 1);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -50,13 +50,13 @@ int main()
|
||||
for (int i = 0; i < studentsAmount; i++)
|
||||
{
|
||||
puts("Prijati studenti:");
|
||||
puts(student[i].meno);
|
||||
puts(student[i].name);
|
||||
}
|
||||
|
||||
for (int i = studentsAmount; student[i].meno[0] != '\0'; i++)
|
||||
{
|
||||
puts("Neprijati studenti:");
|
||||
puts(student[i].meno);
|
||||
puts(student[i].name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -69,7 +69,7 @@ void setMemoryOfArrays(char* processedName, studentsApplication* student)
|
||||
|
||||
for (int i = 0; i < STUDENT_SIZE; i++)
|
||||
{
|
||||
student[i].meno[0] = '\0';
|
||||
student[i].name[0] = '\0';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user