Question: Explain the code line by line. # include tokenizing.h void tokenizing() { printf(*** start of Tokenizing Word Demo *** ); char Words[200];// Declare an array

Explain the code line by line.

# include "tokenizing.h"

void tokenizing() {

printf("*** start of Tokenizing Word Demo *** ");

char Words[200];// Declare an array of char contains 80 characters

char* word;//

int w_counter;//Declaring

while (TRUE) {

printf("Type a few words separated by space (q - to quit) : :);

gets (words);

if (strcmp(words, "q") ==0) break;

word = strtok(words, " ");

w_counter =1;

while (word) {

printf(word #%d is \'%s\' ", w_counter++, words);

word = strtok(NULL, " ");

}

}

printf("*** End of tokenizing Word Demo *** \");

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!