Question: In C++ Write a program. Create a string array in the main0, called firstNameArray, initialize with 7 first names Jim, Tuyet, Ann, Roberto, Crystal, Valla,

In C++ Write a program. Create a string array in the main0,In C++

Write a program. Create a string array in the main0, called firstNameArray, initialize with 7 first names Jim, Tuyet, Ann, Roberto, Crystal, Valla, Mathilda Write a first function, named searchArray, that passes two arguments: a single person's name and the array reference, into a function, This function should then search the array to see if the name is in the firstNameArray. If found, it will return the array index where the name is found, else it return the number 7. (This function needs 3 parameters - see code examples above) Write the code in the main program to call/use the searchArray function. Check the return value for the index value returned. Print the name using the index number(0 to 6), or prints 'name not found' if it return a 7. Write a second function, printAllNames, that will print all the names in the array. Pass the array into the function. (This function needs two parameters- see code example above) Write the code in the main program to call/use this printAlINames function. Write a third function, called deleteName, that will delete a name from the array. Check first to see if the name is in the array, before you try to delete it (use the searchArray function). If you find the name, parameters - see code examples above). Call the printAllNames function to print the array to verify you have deleted a value. Print out the array... if the spot/index in the array is blank do not print it

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!