Question: Create a C + + file with the name problem 4 . cpp . b . Write the function readInput which has a one -
Create a C file with the name problemcpp
b Write the function readInput which has a onedimensional array and an integer as parameters prompting
the user for strings to fill the onedimensional array.
c Write the function getPrefixes which has two onedimensional arrays and an integer as parameters
copying the first three characters as a string of each element of the first array parameter to the
corresponding element of the second array parameter.
d Write the function concatenateStrings which has a onedimensional array and an integer as parameters
returning the concatenated string from all the elements of the array parameter.
e Write the main function that does the following:
i Declare two string arrays called words and prefixes that each have size
ii Call the function readInput passing into it the array words and
iii. Call the function getPrefixes passing into it the array words, the array prefixes, and
iv Call the function concatenateStrings passing into it the array prefixes and assigning its return
value to a string variable.
v Print the concatenated string.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
