The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Use C++ for coding.
Write a function that is given a list of int id’s as a parameter, the id of the person looked for, and the length of the array.Â
Use the data:
Bob    123456           89
Suki    234567           77
Felix   345678           55      Â
Julie    456789           67
The function searches the id array and returns the index of the id or –1 if the id does not exist. The main program outputs the name of the person at that index or a message that the person was not found. The name array (up to length number of students) and id array are declared in function main. Show all the declarations and the actual call. A sample run may look like the following:          Â
 int SearchPerson(const int id[], int length,int who);
 Enter the id of the person                  345678
 That person is:                                    Felix   with a mark of            55
 Enter the id of the person                  444444
 That person does not exist.