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
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