Due by 11:59.59pm Wednesday, April 20
The URL for this github repository is https://classroom.github.com/a/njrKScWE If your partner is submitting an assignment, please submit one yourself, pointing at the partner's repository.
For this assignment create a program pig that will read in English text and translate it into Pig Latin. In particular you'll be working with strings in C.
Pig Latin is used by both adults and children to obfuscate what they are saying from the other. Some of you might have toyed around with the language yourself as a child.
For this assignment, you'll be creating a programs pig. pig will read in English text and convert it into pig latin.
There are a couple of varying rules to Pig Latin. For this assignment, we'll be using the following:
Rule 1:
If the string begins with a vowel (that is begins with 'a', 'e', 'i', 'o', or 'u') add "yay" to the end of the string.Rule 2:
Otherwise, find the first occurance of a vowel, then move all the letters before the vowel to the end of the word and add "ay".Note:
"y" should be considered a vowel in this context.You can consider a word to be a consecutive sequence of letters (A-Z, a-z). "y" should be treated as a consonant if it is the first letter of the word but as a vowel otherwise.
In addition to modifying the words as specified above, your program should also respect the following rules:
Some dialects of pig latin say that you should move "silent" letters to the end as well (such as in the word knife). You can ignore contraction words (don't).
In general, the words will be translated as follows: Linux -> Inuxlay yes -> esyay example -> exampleyay
Some guidelines you should follow when working on your solution:
You'll want to think about how to breaks this program into its component parts.
Additionally, I'd like you to implement a -h and -? flag that prints out a brief usage message and exits the program with a non-zero value. You should do the same if an unknown flag is passed to the program.
You should have your program's main function return 0 upon successful completion of the assigned task.
Create a file called README that contains
Now you should make clean to get rid of your executables and handin your folder containing your source files, Makefile, and README through GitHub
% git add % git commit % git push
Remember, if you have issues with commits due to odd merges, it is easier to start over, clone into a new directory, and copy the files over before commiting and pushing.
In addition, if you are working with a partner, you should do git pull periodically to pull their changes into your direction to avoid having to do a merge
Here is what I am looking for in this assignment: