solution.c:6:17: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Wimplicit-function-declaration]
char *sent = malloc(strlen(str)+1);
^
solution.c:6:17: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc'
solution.c:6:24: warning: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Wimplicit-function-declaration]
char *sent = malloc(strlen(str)+1);
^
solution.c:6:24: note: include the header <string.h> or explicitly provide a declaration for 'strlen'
solution.c:7:4: warning: implicitly declaring library function 'strcpy' with type 'char *(char *, const char *)' [-Wimplicit-function-declaration]
strcpy(sent, str);
^
solution.c:7:4: note: include the header <string.h> or explicitly provide a declaration for 'strcpy'
solution.c:8:18: warning: implicitly declaring library function 'strtok' with type 'char *(char *, const char *)' [-Wimplicit-function-declaration]
char* token = strtok(sent, " ");
^
solution.c:8:18: note: include the header <string.h> or explicitly provide a declaration for 'strtok'
solution.c:10:20: error: use of undeclared identifier 'NULL'
while (token != NULL)
^
solution.c:12:12: warning: implicit declaration of function 'size_word' is invalid in C99 [-Wimplicit-function-declaration]
tmp = size_word(token);
^
solution.c:18:21: error: use of undeclared identifier 'NULL'
token = strtok(NULL, " ");
^
solution.c:22:4: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration]
free(sent);
^
6 warnings and 2 errors generated.