C++ Corresponding position in the two strings that hold exactly the same characters.
Submissions: 783   Accuracy:

59.2%

  Difficulty: Basic   Marks: 1

Given two string of equal length i.e s1 and s2, you need to find how many time the corresponding position in two strings hold exactly the same characters and if a string contains any uppercase character convert that into lowercase and then find the count.   

Input:
The First line of the input contains an integer T denoting the number of test cases. For each test case, there are two strings input s1 and s2 of equal length.

Output:
For each test case, the output is an integer value displaying the number of times characters are same at the corresponding position.

Constraints:
1<=T<=100
The string should contain only alphabets.

Example:
Input:
3
choice chancE
geek Gang
life Tech
Output:
4
1
0

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Vanshika
Author: Vanshika_pec


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.