Question: The function takes three parameters: string array, int arraySize, and string word The function will loop through the string array. If word is found in

  1. The function takes three parameters: string array, int arraySize, and string word
  2. The function will loop through the string array. If word is found in the array, return the matched elements position (index) in the array. Otherwise, return -1.
  3. When a match is found in the array, the loop should be terminated at the time --- no need to continue the loop.
  4. If no match is found, the function should display all elements in the array, as well as the search word.
  5. Please make sure the function cannot modify any data in the array.

USE C++

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!