Question: Write a single C++ program that contains two functions: 1. First function: void FillAndPrintArray () // you have to figure out the parameters Pre-condition: The

Write a single C++ program that contains two functions:

1. First function: void FillAndPrintArray () // you have to figure out the parameters Pre-condition: The function takes an array of characters and its size as parameters Post-condition: The function fills the array with random characters between [A..Z] and prints them neatly on the screen.

2. Second function: void FindChar () Pre-condition: The function takes an array of characters, its size, and a character to search for as parameters Post-condition: The function displays how many times the character was found and the positions it was found at. Create the array in the main( ) and call both functions from the main as well. For example, if the random array has {X, A, B, X, D, B}, and we search for B, your program should display a message saying: B was found 2 times at index: 2 5

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!