Question: Write a program named ProgramAssignment5_YourName.cpp to use arrays in sequential search. Searching some item in a list is to compare every element in the list

 Write a program named ProgramAssignment5_YourName.cpp to use arrays in sequential search.Searching some item in a list is to compare every element inthe list with the given one, if matching return the position; if

Write a program named ProgramAssignment5_YourName.cpp to use arrays in sequential search. Searching some item in a list is to compare every element in the list with the given one, if matching return the position; if not return -1 (the given item is not in the list). Sequential search means the comparison starts from the very first element in the list, one by one, till find the matched item or to the end of the list In this project, the list of items are stored in an array. What you need to do are: 1. Declare an array without initialization 2. Access the element of the array: assign a value to each element of the array 3. Make a function call (review of functions) 4. Access the element of the array: compare each element with the given item . If matching, found is true If not match, forward to the next element for the next comparison 5, Provid In the comments on the top of the code, change the name and date according to the local notes 6. The given code is included in the box on the following pages. Projects for Arrays This illustrates to use a sequential search to * find the tion of the fist apparance of a number in an array * Created b Li i1 10 2018 10 #include using namespace std; 13 /I global constant const int ARRAY SIZE 10 15 16 I 17 18 9 Bint main() // TOD0#5: provide the function prototype for the function sequentialSearch 21 //TODO#1: declare an integer array named intList with size of ARRAY SIZE, no initialization 23 int number; /I hold the number to be searched in the array int position -1; I/ hold the position where the number is in the array 25 26 27 cout number; cout

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!