Write a function that reads a sentence into a string and splits the sentence into words using library functions

#include <stdio.h>

#include <string.h>

int main() {

char sentence[100];

char *p;

printf(“\nPlease enter a sentence :”);

gets(sentence);

p = strtok(sentence, “\t “);

while ( p != NULL ){

printf(“%s\n”, p);

p = strtok(NULL, “\t”);

}

return 0;

}