option(c) is correct
we can simply do this by using only one for loop that will take O(n) time and space complexity=input+extra =O(n)+O(1)=O(n).. as follows:-
#include <stdio.h>
int main() {
int A[10]={1,0,0,0,0,0,0,0,0,0};
int B[10]={0,1,1,1,1,1,1,1,1,1};
int i,len=0,l=0;
for(i=0;i<10;i++)
{
if (A[i]==B[i])
{
len++;
}
else{
if(l<len)
{
l=len;
}
len=0;
}
}
if(l!=0)
printf("%d",l);
else
printf("no match");
return 0;
}