Compare two Strings
//Compare two Strings :)
# include
# include
main()
{
char arr1[5];
char arr2[5];
printf("\nEnter the First String : ");
gets(arr1);
fflush(stdin);
printf("\nEnter the Second String : ");
gets(arr2);
fflush(stdin);
if((strcmp(arr1,arr2)==0))
{
printf("\n Strings are Equal");
}
else
{
printf("\nStrings are Not Equal");
}
}
0 comments:
Post a Comment