the line parameter given will be a string start with a tab. I want to store every word (splited by space) except the tab to a char **

Action *parse_action_line(char line[MAXLINE]){
    int max_strings = MAXLINE/2;
    char **args_array = malloc(max_strings * sizeof(char *));
    char *delim = "\t";

    // Gives the string before "\t" which is empty.
    char *token = strtok(line, delim);
    // Gives the string before " " and after "\t"
    token = strtok(NULL, " ");
    int i = 0;

    while (token != NULL)
    {
        args_array[i] = strdup(token);
        token = strtok(NULL, " ");
        i++;
    }
    // Last element in Action->args is NULL.
    args_array[i] = NULL;

    Action *new_action = malloc(sizeof(Action));
    new_action->args = args_array;
    new_action->next_act = NULL;

    return new_action;
}