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
What is the collection of communication lines and routers called?
How to delete a node from linked list w/o using collectons?
Compare array data type to pointer data type
Write a program to print factorial of given number without using recursion?
what is reason of your company position's in india no. 1.
How can I read in an object file and jump to locations in it?
What is meant by operator precedence?
Which is an example of a structural homology?
Why use int main instead of void main?
List some of the static data structures in C?
What does int main () mean?
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
Explain enumerated types in c language?
What is variable declaration and definition in c?
What is wild pointer in c?