Question: C + + Programming ssignment: Searching an Array In this assignment, you will write a well formatted C + + program that searches two arrays.
C
Programming ssignment: Searching an Array
In this assignment, you will write a well formatted program that searches two arrays.
Download and save the two files attached to this assignment. One is a sorted
collection of integers and the other an unsorted collection of integers.
The program should do the following:
Read each file an initial arrays named sortedarray and unsortedarray.
A function with the prototype
bool linearsearchint array int size, int searchvalue
that performs a linear search of the array and returns true if the value is found.
A function with the prototype
bool binarysearchint array int size, int searchvalue
that performs a binary search of the array and returns true if the value is found.
The main function should query the user to enter a value to search for and display the
following messages:
You entered xxxxxx
The value was not found in the sorted array
The value was not found in the unsorted array
Notes
Where is the value provided by the user.
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
