#include <string.h>
#include <stdio.h>
void stringchk(char s1[], char s2[]);
int main()
{
char strg1[10],strg2[10];
printf("Enter 1st String:");
scanf("%s",strg1);
printf("Enter 2nd String:");
scanf("%s",strg2);
stringcmp(strg1,strg2);
return 0;
}
void stringchk(char *p1, char *p2)
{
int a,b;
for(a=0;s1[a]!='\0';a++)
{
for(b=0;p2[b]!='\0';b++)
{
if(p1[a] == p2[b])
continue;
}
}
if (a==b)
{
printf("String p1:%s and p2:%s are Equal\n",s1,s2);
}
else
printf("String p1:%s and p2:%s are Not Equal\n",s1,s2);
}
Bookmarks