String tokenizing with arbitrary token count in C
I see some things that I think could help you improve your code.

Use the required #includes

The code uses malloc which means that it should #include &lt;stdlib.h&gt;.  It also uses strtok which is in string.h.

Don't leak memory

This code calls malloc several places but doesn't match each one with a call to free.  This means that the routines are leaking memory. Specifically, just before the call to free(tokens); in main, you need to also free the individually allocated memory:

for (size_t j = 0; j &lt; tokens_wanted; ++j) {
   free(tokens[j]);
} 


Use const where practical

The comment about making a copy of line to prevent it from being changed suggests that it should be declared const in the parameter list:  

int get_tokens(const char *line, char **tokens, size_t number_of_tokens) {


Also, the delimiter string should also be const and probably also static.

Consider a different interface

In the current code the return value of get_tokens isn't used.  It also prints and exits the program in some circumstances.  Instead, I'd advice changing the interface in a couple of ways.  First, I'd recommend that the caller make a copy of the string if necessary.  This makes the code cleaner and simpler and allows the caller to perhaps do something other than simply abruptly halting the program if an empty string is found.  Second, I'd suggest that because strtok operates by modifying the passed string, there really isn't a need to allocate more memory and copy.  Instead, I'd recommend that the pointers returned can simply point to the passed string.  The much-simplified version might look like this:

void get_tokens(char *line, char **tokens, size_t number_of_tokens) {
    static const char *delimiter = " ";
    for (size_t i = 0; i &lt; number_of_tokens; ++i) {
        tokens[i] = strtok(line, delimiter);
        line = NULL;
    }
}


This works nicely and is much simpler.  If fewer than the requested number of tokens is found, the remaining tokens pointers are set to NULL. The calling function might look like this:

int main() {
    const size_t line_length = 100;
    char line[line_length];
    get_line(line, line_length);

    size_t tokens_wanted = 2;
    char **tokens = malloc(tokens_wanted * sizeof(char**));
    if (tokens == NULL) {
        perror("out of memory!");
        return 1;
    }
    get_tokens(line, tokens, tokens_wanted);
    for (size_t i=0; i &lt; tokens_wanted; ++i) {
        printf("token[%lu] = \"%s\"\n", i, tokens[i]);
    }
    free(tokens);
}


Omit return 0

When a C or C++ program reaches the end of main the compiler will automatically generate code to return 0, so there is no need to put return 0; explicitly at the end of main.  

Note: when I make this suggestion, it's almost invariably followed by one of two kinds of comments:  "I didn't know that." or "That's bad advice!"  My rationale is that it's safe and useful to rely on compiler behavior explicitly supported by the standard.  For C, since C99; see ISO/IEC 9899:1999 section 5.1.2.2.3:


  [...] a return from the initial call to the main function is equivalent to calling the exit function with the value returned by the main function as its argument; reaching the } that terminates the main function returns a value of 0.


For C++, since the first standard in 1998; see ISO/IEC 14882:1998 section 3.6.1:


  If control reaches the end of main without encountering a return statement, the effect is that of executing return 0;


All versions of both standards since then (C99 and C++98) have maintained the same idea.  We rely on automatically generated member functions in C++, and few people write explicit return; statements at the end of a void function.  Reasons against omitting seem to boil down to "it looks weird".  If, like me, you're curious about the rationale for the change to the C standard read this question.  Also note that in the early 1990s this was considered "sloppy practice" because it was undefined behavior (although widely supported) at the time.  

So I advocate omitting it; others disagree (often vehemently!)  In any case, if you encounter code that omits it, you'll know that it's explicitly supported by the standard and you'll know what it means.