My issue
not matching the case according to output.
My code
#include <stdio.h>
#include<string.h>
int main(void) {
// your code goes here
int num,res=0;
scanf("%d",&num);
while(num>0)
{
char str1[10],str2[10];
scanf("%s",str1);
scanf("%s",str2);
int length=strlen(str1);
num--;
for(int i=0;i<length;i++)
{
if(str1[i]==str2[i])
{
res=1;
}
else if(str1[i]=='?' || str2[i]=='?')
{
res=1;
}
else
{
res=2;
break;
}
}
if(res==1)
{
printf("Yes\n");
}
else
{
printf("No\n");
}
}
return 0;
}
Learning course: Strings using C
Problem Link: CodeChef: Practical coding for everyone