main()
{
int i=0;
char s1[10],s2[10];
printf("Enter 2 strings\n");
scanf("%s%s",s1,s2);
while (s1[i]==s2[i] && s1[i]!='\0' && s2[i]!='\0')
i=i+1;
if ( s1[i]=='\0' && s2[i] =='\0')
printf(" equal");
else
printf(" not equal");
}
Hello welcome to my learning blog. My name is Murali Gist. I am a blogger from India.If you are looking information for new type of coding examples, you have come to the right place.I have failed. But i have been successful. -Murali Gist
Thursday, 12 March 2015
Compare two strings without using 'strcmp'
Subscribe to:
Posts (Atom)