Question: follow the requirement to write a c program. thankyou very much Write a program to create random sentences. Read from an input file that contains


follow the requirement to write a c program.
thankyou very much
Write a program to create random sentences. Read from an input file that contains article, nouns, verbs, and prepositions. An example input file 10 Articles 5 the a one some any Nouns 5 boy girl dog town car VerbS 5 drove jumped ran walked skipped Prepositions 5 to from over under on The first integer in the file (10 in the example) specifies the number of sentences to generate. The rest of the input file has sections for each part of speech (your code needs to handle these being in any order). The first string will specify the part of speech ("Articles" in the example) and an integer specifying the number of that type of word that is on the next line (5 in the example). You may assume no word in the file is over 75 characters long The words given for each part of speech are to be stored in a dynamically allocated array of strings (a "jagged" 2D array). Thus assuming the input file above, an array called articles would look like this a 1o 0 Each of these arrays (articles, nouns, verbs, prepositions) should be displayed in alphabetical order (implement your choice of sorting algorithm). After the arrays are set up and sorted, generate the random sentences and display them numbered. Example output (you do not have to match this format)
Step by Step Solution
There are 3 Steps involved in it
To write a C program that generates random sentences based on the input file provided follow these steps Steps 1 Read the Input File Read the file to determine the number of sentences and the words fo... View full answer
Get step-by-step solutions from verified subject matter experts
