Write a program that encodes english language phrases into


Write a program that encodes English language phrases into pig Latin. Pig Latin is a form of coded language oftenused for amusement. Many variations exist in the methods used toform pig Latin phrases. For simplicity, use the followingalgorithm: To form a pig-Latin phrase from an English-languagephrase, tokenize the phrase into words with functionstrtok. To translate each English word into a pig-Latinword, place the first letter of the English word at the end of theEnglish word and add the letters "ay." Thus, the word"jump" becomes "umpjay," the word "the"becomes "hetay" and the word "computer" becomes"omputercay." Blanks between words remain as blanks.Assume that the English phrase consists of words separated byblanks, there are no punctuation marks and all words have two ormore letters. FunctionprintLatinWord should display eachword. [Hint: Each time a token isfound in a call to strtok, pass the token pointer tofunction printLatinWord and print the pig-Latin word. Thislab should be implemented using C-style, pointer-basedstrings.] Extra credit [20 points]: tomake sure your pig Latin word is pronounceable, follow theserules: 1. If the first letter is a vowel, place "way"at the end to form a pig Latin word. 2. Move the consonant(s) to the end of the wordand append "ay" to it. You may have one or more consonants beforeyou see the first vowel.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a program that encodes english language phrases into
Reference No:- TGS01211532

Expected delivery within 24 Hours