In this program we are counting for number of nodes in the ternary tree. Three condition can occur while counting exactly 3 children,
Cond. 1 : Tree with No child
if L==NULL return 0; //this line check for that.
cond. 2 : Tree with left, right & middle child
i=L --> left &&L ---> middle &&L --> right ?1:0 //this line is supposed to check for that.
cond 3 : Tree with further Left, right and middle sub child/grand child
i+ func L -> left+ func L -> middle +func L -> right ; //this line will check for that.
So answer is choice A.