Learning course: Strings using C
Problem Link: CodeChef: Practical coding for everyone
Feedback
include <stdio.h>
include <string.h>
int main(void) {
// your code goes here
int i,t,jay=0;
char x[100],y[100];
scanf(“%d”,&t);
while(t–)
{
scanf(“%s%s”,x,y);
for(i=0;i<strlen(x);i++)
{
if (x[i]==y[i] || x[i]==‘?’ || y[i]==‘?’){
jay++;
}
else{
jay=0;
}
}
if(jay==strlen(x))
{
printf(“Yes\n”);
}
else{
printf(“No\n”);
}
}
return 0;
}
This code is right but still its showing that it has not satisfied one of the testcase, whereas when I’m checking the output for the same testcase on an online complier it is showing the me the correct answer. The expected answer is “YES” and I’m getting the same answer on the online complier but why is codechef showing “No” as the output?