Question: please provide simple c++ code only URGENT Write and test a program that reads the content of the file word by word, convert each word

please provide simple c++ code only URGENT
please provide simple c++ code only URGENT Write and test a program

Write and test a program that reads the content of the file word by word, convert each word to plural form and print it back to the user in reverse order. Develop the following function: string* read Words(string file name, int& size): This function should read the file given by file_name word by word, save the words into an array of strings an return it to the called, the function need to open the file twice, one to count the number of words and the other time is to read them into the dynamic array. Develop the following function: string change_to_plural (string word); Use the following rules: . if noun ends in "y" remove the "y" and add "ies" if noun ends in s or sh" add "es" all other cases just add "3" Complete the following main: int main() { //TODO 1: declare all required variables //TODO 2: read all the words in the file input.txt into a dynamic array using the readWords function. //TODO 3: print the words in plural form to the user in reverse order //TODO 4: free any dynamic memory } For the following input file: input.txt chair diary boss circus fly dog clue dish Your program should print: dishes clues dogs flies circuses bosses diaries chairs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!