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

Explain the difference between strcpy() and memcpy() function?

989


find out largest elemant of diagonalmatrix

2233


Write a program to find factorial of a number using recursive function.

1106


Apart from dennis ritchie who the other person who contributed in design of c language.

1380


What are integer variable, floating-point variable and character variable?

1229


what are the 10 different models of writing an addition program in C language?

1879


How can I implement a delay, or time a users response, with sub-second resolution?

1055


Is c pass by value or reference?

1026


Are the outer parentheses in return statements really optional?

1101


Should a function contain a return statement if it does not return a value?

1063


What is page thrashing?

1063


What is hashing in c?

1149


c program for searching a student details among 10 student details

2083


What is atoi and atof in c?

1074


Describe static function with its usage?

1188