Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment purpose: User defined functions, arrays, c- style strings, file output Your assignment is to write program that scans words from the keyboard and makes

image text in transcribed

Assignment purpose: User defined functions, arrays, c- style strings, file output Your assignment is to write program that scans words from the keyboard and makes them plural and saves both the original form of the word and the plural form in an output file called pluralWords.txt l. If the word ends in y', remove the" y, and add "ies" to the end. Examples: cherry becomes cherries If the word ends with the letters s"ch", or "sh" then simply add the letters es" to the end Examples: bus becomes buses, church becomes churches If the above rules above do not apply then just add the letter's' to the end of the word. Examples: Mushroom becomes mushrooms 2. 3. .Your program will ask the user if they want to enter a word, then read the word from the keyboard You may use scanf("%s", word); //word is a character array of size 20 After reading each word your program will create either an all upper or all lower version of the word and . make a copy of that word. Next your Next your program will save the original input word (that is all uppercase or all lowercase), to a file and also program will create the plural form of the word and di splay it on the screen. save the plural form in the same file. Your program will repeatedly read in words in English and output singular and plural words to the file until the user decides to quit (by entering n) You may assume that all input will be typed in alphabetic characters and that no punctuation or numeric characters will be used. You don't need to check this you can simply assume that the input will only contain the letters A through Z and no white space in the words. You do NOT need to verify whether or not the user entered a real word or a "nonsense" word. Your program must have a minimum of 8 user defined functions (you may use additional functions) o o o o o o A function that greets the user A function that gets the word from the user A function that changes the word to all uppercase or all lowercase letters A function that determines which rule applies to the word. A function for each rule that converts a single word (3 functions) A function that saves both words to the output file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions

Question

Give the percentages of the three ways CO2 is transported in blood.

Answered: 1 week ago

Question

Explain in simple terms how cross-validation of data works.

Answered: 1 week ago

Question

What are the stages of project management? Write it in items.

Answered: 1 week ago