Question: If I have some kind of tree, and I need to find a specific node in that tree which is essentially null (the struct is not initialised / malloc'ed yet).

If I want to return that very specific uninitialised struct place to be able to initialise it, would something like:

```
if (parentNode->childNode == NULL)
    return parentNode->childNode;

```

work? Or would it return NULL? Would I need to return the parent node instead?

The problem I have is that this specific node may be a child of multiple different struct types. I'm not sure how to overcome this in C, since it does not support generics. Does anyone have any ideas?

Answer: 
You can not return NULL. It will not be an identifiable location. 

What you can do however is:

* `malloc` the node at the point where you find it and return the pointer returned by malloc,
* you can `return &(parentNode->childNode)` (a pointer to the childNode pointer) which the caller of 
the function can use to set it to the new node, or
* `return parentNode`

I don't see how that problem could be mitigated by generics.
You can return NULL, but it would make no sense. You can return a *pointer* to the pointer whose value is NULL:

```
typedef struct link {
        struct link *next;
        } LL;

LL **getTailPP(LL **ppHead)
{
    for( ; *ppHead; ppHead = &(*ppHead)->next ) {;}
    return ppHead;
}

```