Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a own function to compare two strings with out using
stringcomparition function?

Answer Posted / geetha

main()
{
char a[10],b[10];
int i,l2,l1;
printf("Enter two strings");
scanf("%s\n",a);
scanf("%s",b);
l1=strlen(a);
l2=strlen(b);
if(l1==l2)
{
for(i=0;i<l1;i++)
{
if(a[i]==b[i])
continue;
else
printf("no match");
break;
}
}
else
printf("no match");
if(i==11)
printf("both strings are same");
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the keywords in c?

1094


What are types of functions?

996


Why isn't it being handled properly?

1017


Where can I get an ansi-compatible lint?

1115


Why is this loop always executing once?

1008


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1817


Can you please explain the scope of static variables?

1011


Is main is a keyword in c?

1082


What is meant by inheritance?

1059


What is volatile keyword in c?

1009


What is the difference between pure virtual function and virtual function?

1086


How would you obtain the current time and difference between two times?

1250


What are the c keywords?

1160


What are two dimensional arrays alternatively called as?

1150


What are the disadvantages of external storage class?

1020