Question: Implement a C-string function with the prototype below int matchCount(char s[], char t[]); The function returns the number corresponding characters of s and t that

Implement a C-string function with the prototype below

int matchCount(char s[], char t[]);

The function returns the number corresponding characters of s and t that match (not including the null terminators). For example if s is "abcde" and t is "axcyew" then the return value will be 3 since the first, third and fifth characters of s and t match. Use only pointer notation, not subscripts. Also do not use any local variables of type int, other than to keep track of the count. That means you code will probably use the increment operator directly on pointers, e.g. s++.

Please provide code for function itself and whole program.

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!