[Solved] Compare two strings and find mismatch count [closed]
strcmp will not give you the number of characters matching in the given strings. Try the below code, It will give number of matching characters in the input strings. #include <string.h> int GetMatchingChars (const char *s1, const char *s2) { int len1; int len2; int count = 0; int minLen = 0; char *shortPtr = … Read more