To write the program as described, some parameters would have to be defined differently.
void hozzafuz(Adatok** head, Adatok* aktualis);
void szetszed(Adatok* eredeti_lista, Adatok** lista1, Adatok** lista2, Adatok** lista3, Adatok** lista4)
{
int osszesElem = osszkerdes(eredeti_lista);
int reszMeret = osszesElem / 4;
Adatok* aktualis = eredeti_lista;
for (int i = 0; i < osszesElem; ++i) {
if (i < reszMeret) {
hozzafuz(lista1, aktualis);
}
else if (i < 2 * reszMeret) {
...
}
aktualis = aktualis->next;
}
}
Example Output:
21160, 1952, 30909, 8715, 27167, 22552, 17665, 32119, 11123, 23700, 5219, 22031, 13750, 18673, 22556, 29110, 10890, 7768, 6784,
21160, 1952, 30909, 8715,
22552, 17665, 32119, 11123,
5219, 22031, 13750, 18673,
29110, 10890, 7768, 6784,