Pig Latin Generator (50pts) Write a program that encodes English-language phrases into (a simplified version of) Pig Lat
Posted: Tue Jul 05, 2022 10:33 am
Pig Latin Generator (50pts) Write a program that encodes English-language phrases into (a simplified version of) Pig Latin. The code should: prompt the user for phrase. use strtok to split the phrase into words take the first letter of each word and move it to the end of the word add the letters "ay" to the word. • • Example: if the sentence is then the result should be: Pig latin is cool igpay atinlay siay oolcay. Assume the following: • the words in the phrase are separated by blanks • there are no punctuation marks • all words have two or more letters Create a function that converts each word to Pig Latin and displays it. Every time the strtok function is used, pass the token pointer to the function and print the Pig Latin word.