I keep getting WA in TWOSTR (beginner practice prob) here is my code, can you please point out where I am wrong?
Thank You
#include <stdio.h>
#include <strings.h>
int main(void)
{
int t;
scanf(" %d",&t);
while(t--)
{
char a[11], b[11];
int i, l, flag = 1;
scanf(" %s",a);
scanf(" %s",b);
l = strlen(a);
for(i=0;i<l;i++)
{
if(a[i] != b[i])
{
if(a[i] == '?' || b[i] == '?')
flag = 1;
else
{
flag = 0;
printf("NO\n");
break;
}
}
}
if(flag)
printf("YES\n");
}
return 0;
}