Question: Write a function in C that tokenizes a string. The function should print each token/word on one line. Signature of the function should be like:
Write a function in C that tokenizes a string. The function should print each token/word on one line. Signature of the function should be like:
Void printTokens(char *inputString);
For example, if the input is:
Hi there! How is it going?
The output should be:
Hi
There!
How
is
it
Going?
Notes:
-
You should handle leading/trailing withespaces.
-
You should not use any other functions (in string.h, etc) that we havent covered in lectures.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
