Question: 8. (18 points) Arrays, Pointers, Functions, and Basic I/O. There are two parts in this problem. a) (6 points) Write a function called findMismatch that

 8. (18 points) Arrays, Pointers, Functions, and Basic I/O. There are

8. (18 points) Arrays, Pointers, Functions, and Basic I/O. There are two parts in this problem. a) (6 points) Write a function called findMismatch that takes three arguments: an integer len, a int* that points to an array of len items, and another int* that points to an array of len items. The function should return the first index where the values of the arrays differ, or 1 if the arrays are the same. For example, if the arrays were {3,4,7,12, 17) and {3,4,9,12,0}, the function should return 2 (because 7 and 9 are not the same)

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!