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 the function itself, not a whole program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started