I was given the task of making this function recursive, but I have no idea how to do it.
int existe (int x){
FILE *arq;
int y;
char buf[MAX];
arq = fopen ("cliente.txt","r");
fgets (buf,MAX,arq);
while (!feof(arq)){
y = atoi(strtok(buf,";"));
if (x==y){
fclose (arq);
return 1;
}
fgets (buf,MAX,arq);
}
fclose (arq);
return 0;