So I have two char arrays: ABDBA and ABCED. How can I write a code, that would compare those two arrays and print the how much mutual characters (in the same spots) they have?
For example, ABDBA and ABCED have 2 mutual characters in the same spots - A and B, so the printed number would have to be 2.