Inserting into a binary search tree in C
There is a third option:

Node *add_internal(Node *root, int value) {
    if(root == NULL) {
        return create_node(value);
    }

    // Decide whether to insert left or right
    if (root-&gt;value &gt;= value) {
        root-&gt;left = add_internal(root-&gt;left, value);
    } else {
        root-&gt;right = add_internal(root-&gt;right, value);
    }
    return root;
}


Basically moves the null test into the recursive call.

However this version requires it to be called as root = add_internal(root, value);. But it has the advantage that it can deal with a null root in a transparent way.