So i have this code (main.c tab) and the output (untitled tab):
GDB online Debugger | Code, Compile, Run, Debug online C, C++

The problem is:

I don't want a node to have a repeated child e.g. node at level 2 had a child 'd' so it can't have another child 'd'.
for that i had a simple loop at line 38:

Code:
for(c = 0; c < 3; c++){
        if( mother->child[c] != NULL){
            if(choice == mother->child[c]->opt){
                choice++;
            }
        }
    }

But if you check the output this seems to be ignored. I don't have time to change the whole logic. I wanna know if somehow i can fix it or should I accept my fate.