C Programming Write a function to deeply clone copy all values of a tree of degree 5 programming homework help
Write a function to ‘deeply clone/copy’ all values of a tree of degree 5 as defined as follows:
struct tnode_int;
typedef struct tnode_int *tnode;
struct tnode_int
{
void *data;
tnode branches[5];
};
typedef struct tree_int {tnode root;} *tree;
You should return the copy — your function should have the following header:
tree clone(tree t, void *(*copyData)(void *));