#include<stdio.h>
#include<string.h>
Void main()
{
char a[20],b[20],i,l1,l2;
printf("Enter the first string");
gets(a);
printf("Enter the second string");
gets(b);
l1=strlen(a);
l2=strlen(b);
if(l1==l2)
{
for(i=0;i<=l1-1;i++)
{
if(a[i]!=b[i])
break;
}
if(i==l1)
printf("string matched");
else
printf("string not matched");
}
else
printf("string not matched");
getch();
}
#include<string.h>
Void main()
{
char a[20],b[20],i,l1,l2;
printf("Enter the first string");
gets(a);
printf("Enter the second string");
gets(b);
l1=strlen(a);
l2=strlen(b);
if(l1==l2)
{
for(i=0;i<=l1-1;i++)
{
if(a[i]!=b[i])
break;
}
if(i==l1)
printf("string matched");
else
printf("string not matched");
}
else
printf("string not matched");
getch();
}
3 Comments
Excellent
ReplyDeleteVery good sir
ReplyDelete👌👌👌👌
ReplyDelete