A singly linked list implementation in C
Do not cast the result of malloc. If your code does #include &lt;stdlib.h&gt;, the cast is redundant. If it does not, the cast just masks the warning, which may lead to hard to find bugs.
Prefer sizeof(object) to sizeof(type). The latter leads to the double maintenance problem, in case the type is changed.
I strongly recommend to have a constructor-like function to create a node:

struct node * create_node(int num)
{
    struct node * node = malloc(sizeof(*node));
    node-&gt;value = num;
    node-&gt;next = NULL;
    return node;
}


It will spare you plenty of trouble when the definition of struct node changes.
You should get a warning that get doesn't always return a value (if you do not, enable all warnings, or change the compiler). It is a very serious warning, and in real life the code with such a problem leads to some dire consequences. You must return get(lst-&gt;next, pos); in a recursive clause.

The fact that your main printed expected values is an unlucky coincidence.

What to return in the IndexOutOfBound situation is a different matter. Consider returning an error code along with the value.
Calling length(lst) at each level of recursion degrades performance to quadratic.
As a side note, rather than testing for position &lt; 0, consider passing a position as some unsigned type. size_t is the most obvious candidate.
Along the same line, a low level utility function such as get should refrain from printing anything.
I strongly advise agains recursion when an iterative solution is immediately available.