This is the code, I think I terminated it well, and I fixed that unneeded double pointer
Code:
#include <stdio.h>
#include <stdlib.h>
typedef struct record
{
int getal;
struct record *volg;
}ELT;
void maak_list(ELT**, int*);
ELT* koppel(ELT *kop1, ELT *kop2);
void toon_list(ELT*);
int main(void)
{
int tab1[]={1, 2, 3, 4, 5, 0};
int tab2[]={6, 7, 8, 9, 0};
ELT *kop1=NULL, *kop2=NULL, *kop;
maak_list(&kop1, tab1);
maak_list(&kop2, tab2);
//kop=koppel(kop1, kop2);
//toon_list(&kop);
toon_list(kop1);
toon_list(kop2);
return 0;
}
void maak_list(ELT **pkop, int* tab)
{
ELT *p, *vorig;
int i;
p=malloc(sizeof(ELT));
p->getal=*tab;
(*pkop)=p;
vorig=pkop;
for(i=1; tab[i]; i++)
{
p=malloc(sizeof(ELT));
p->getal=tab[i];
vorig->volg=p;
vorig=p;
}
p->volg=NULL;
}
void toon_list(ELT* p)
{
if(p)
{
if(p->volg)
toon_list(p->volg);
printf("%d\n", p->getal);
}
}