Well you are not really going about this the right way. Lets see what we have so far:
1) read in lines of text from the user
Code:
char input[81];
printf("Enter sentences (or CTRL-z to terminate)=>");
fgets(userInput,sizeof(userInput), stdin);
This part is good so far with the exception of replacing gets with fgets.
2)call a function to extract words one by one from the line
And this is where everything goes all crazy. You do not have a function, which is the first thing I noticed. Secondly you seem like you do not have an understanding over how strtok() operates. strtok() replaces the delimeter with a null character and then returns a pointer to the first "word". Now subsequent calls to strtok() with NULL as the first argument will keep going through the same array passed to it. Now since I feel like being nice and I know strtok thows some people through loops I am including an example program to demonstrate its use. THIS DOES NOT ANSWER YOUR HOMEWORK ASSIGNMENT. It simply demonstrates strtok and loops.
Code:
#include <stdio.h>
#include <string.h>
int main(void) {
char userInput[81], *token[80]; //user input and array to hold max possible tokens, aka 80.
int i=0; // used to iterate through array
printf("Enter a line of text to be tokenized: ");
fgets(userInput,sizeof(userInput), stdin);
token[0] = strtok(userInput, " "); //get pointer to first token found and store in 0
//place in array
while(token[i]!= NULL) { //ensure a pointer was found
i++;
token[i] = strtok(NULL, " "); //continue to tokenize the string
}
for(int j = 0; j <= i-1; j++) {
printf("%s\n", token[j]); //print out all of the tokens
}
return 0;
}
Now once you've played around with this generate your function and post your updated code to get further guidance if you require it.