Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PROGRAMMING LANGUAGE C You are now allowed to use the following in additional to the techniques of the previous chapters: pointers pointer operators pass by
PROGRAMMING LANGUAGE C
You are now allowed to use the following in additional to the techniques of the previous chapters:
pointers
pointer operators
pass by reference simulation
const qualifiers
size of operator
function pointers
character handling library
string handling library
string conversion functions
additional input/output functions from: getchar() , fgets() , putchar() , puts() , sprintf() , sscanf()
W Assignments: COP3223 ) Assignments: COP322- Homework-08-SP ng C How to Program eChegg Study Guided x-e PROGRAMMING LANG 1 ? 0 ? x x ? | file:///C/Users/Valena%20Moctezuma/Downloads/Homework-08-Spring-2018-1%2011.pdf Homework-08-Spring-2018-1 (1)-pdf 213 Q2: (Random Sentences) (25 points) Write a program that uses random number generation to create sentences. The program should use four arrays of pointers to char called article, noun, verb and preposition. The program should create a sentence by selecting a word at random from each array in the following order: article, noun, verb, preposition, article and noun. As each word is picked, it should be concatenated to the previous words in an array large enough to hold the entire sentence. The words should be separated by spaces. When the final sentence is output, it should start with a capital letter and end with a period. The program should generate 20 such sentences. The arrays should be filled as follows: The article array should contain the articles "the", "a", "one", "some" and "any"; the noun array should contain the nouns "cat", "dog", "truck", "plane" and "skateboard"; the verb array should contain the verbs "drove", "jumped", "ran", "walked" and "flew"; the preposition array should contain the prepositions "to", "from", "over", "under" and "on" S:01 PM O Type here to searchStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started