Consider the following representation of a ternary tree where $A: B,C,D$ denote that $B,C$ and $D$ are the child nodes of $A.$
- $1:2,3,4$
- $2:5,6$
- $3:7$
- $4:8,9,10$
If the root of the above tree is passed to the following C function (assume the the child nodes are represented by child1, child2 and child3 and all NULL values are assigned properly), the return value will be _____
int foo(struct node *root)
{
if(!root) return 0;
return 1 + foo(root->child1) +
foo(root->child2) +
foo(root->child3);
}