Question: Write a C program that takes an input string, and then tokenizes it. Your program should have following function: void printTokenizedString(char *inputString) Input: Are you
Write a C program that takes an input string, and then tokenizes it.
Your program should have following function:
void printTokenizedString(char *inputString)
Input:
Are you enjoying coding ?
Output:
Are
you
enjoying
coding
?
Your function should be able to handle trailing and leading spaces at the beginning & end of the sentences.
Skeleton code:
SPACE_CHARACTER
Char* moveToNextToken(char* inputString). //return next word that is not a space
Char* printTokenAndGetNextToken(char* inputString) //print token (non space word)
//and return next token
void printTokenizedString(char* inputString(
main(){
//provide test cases here
char* test1 = Are you enjoying coding ?
printTokenizedString(test1);
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
