Question: Create a regular c-type function, called searchVector, that takes in an integer vector and an integer to search for. This function returns a boolean value

Create a regular c-type function, called searchVector, that takes in an integer vector and an integer to search for. This function returns a boolean value indicating whether or not the value is in the vector.

1. Populate a 15 element vector with random integers from 0 to 9.

2. Output the vector contents to the screen.

3. Ask the user what number to search for.

4. Output to the screen whether or not the number is in the vector.

5. Ask the user if he wishes to search the same vector again.

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!