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


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.<br>Use the data:<br>Bob<br>123456<br>89<br>Suki<br>234567<br>77<br>Felix 345678<br>55<br>Julie<br>456789<br>67<br>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<br>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<br>the declarations and the actual call. A sample run may look like the following:<br>int SearchPerson(const int id[], int length,int who);<br>Enter the id of the person<br>345678<br>That person is:<br>Felix with a mark of<br>55<br>Enter the id of the person<br>444444<br>That person does not exist.<br>

Extracted text: 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.

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here