111111
This commit is contained in:
parent
35433ace55
commit
0c730c6c4f
@ -11,8 +11,7 @@ int compare(const void* arg1, const void* arg2) {
|
||||
}
|
||||
|
||||
int main() {
|
||||
char* pole_smernikov[SIZE];
|
||||
memset(pole_smernikov, 0, SIZE * sizeof(char*));
|
||||
char* pole_smernikov[SIZE] = {NULL}; // Inicializujeme všetky smerníky na NULL
|
||||
int pocet_mien_v_poli = 0;
|
||||
|
||||
char line[SIZE];
|
||||
@ -49,7 +48,10 @@ int main() {
|
||||
|
||||
// Výpis prijatých a neprijatých študentov
|
||||
int max_students;
|
||||
scanf("%d", &max_students);
|
||||
if (scanf("%d", &max_students) != 1) { // Kontrola úspešnosti načítania
|
||||
fprintf(stderr, "Chyba pri načítaní počtu študentov\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
printf("Prijati studenti:\n");
|
||||
for (int i = 0; i < max_students && i < pocet_mien_v_poli; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user