Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am writing a pig latin program. I have tokenized the string the user has entered into individual words. Now I want to take each
I am writing a pig latin program. I have tokenized the string the user has entered into individual words. Now I want to take each token and make them an array of characters. How can I store the characters of each token into an array? This is what I have so far.
1int main(void) char string[SIZE]; int i=0; char latin[SIZE]; printf("Enter String In") fets(string, sizeof string, stdin) printf(" Enter String "); //read string fgets (string, sizeof string, stdin); //create pointer and tokenize char *tokenPtr = strtok(string, " "); E while (tokenPtr) \ latin = tokenPtr; strtok(NULL, " toke nPtr "); =Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started