Question: USING C++: You are given two arrays of integers (A and B) each of size n. If at an index i, both A and B

USING C++:

You are given two arrays of integers (A and B) each of size n. If at an index i, both A and B contain the same element (i.e. A[i]==B[i]) we say that the arrays match at i. Write a function that given the arrays, will return the number of total matches. The function prototype is provided below.

E.g. A={10, 20, 30, 40 ,50}, B={10, 30, 25, 40, 50}, then totalMatches(A,B,5) will return 3 (they match at indexes 0, 3 and 4) 

int totalMatches( int[], int[], int);

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!