Question: Consider the testPIN function used in Program 7-21. For convenience, we have reproduced the code for you below. Modify this function as follows: change its

Consider the testPIN function used in Program 7-21. For convenience, we have reproduced the code for you below. Modify this function as follows:

change its type to int

change its name to countMATCHES

make it return the number of corresponding parallel elements that are equal

bool testPIN(int custPIN[], int databasePIN[], int size) { for (int index = 0; index < size; index++) { if (custPIN[index] != databasePIN[index]) return false; // We've found two different values. } return true; // If we make it this far, the values are 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!