Vishal
Vishal
#include <stdio.h>
#include<string.h>
int main() {
char a[100],b[100];
int l1,l2,flag;
printf("enter the string a\n");
gets(a);
printf("enter the string b\n");
gets(b);
l1=strlen(a);
l2=strlen(b);
for(int i=0;i<l1;i++)
{
if(l1!=l2)
{
printf("str1 not equal to str2\n");
break;
}
else if(l1==l2)
{
if(a[i]==b[i])
{
flag=1;
}
else{
flag=0;
break;
}
}
}
if(flag==1)
{
printf("str1 is equal to str2\n");
}
else if(flag==0)
{
printf("str1 not equal to str2\n");
}
return 0;