Write a program to compare two strings without using the
strcmp() function
Answer Posted / akash aggarwal
Guys What the hell????
strcmp tells you whether strings are equal or not, if not which is greater then other.....
So first compare their length...
example let
str1="abc";
str2="abcde";
now compare their lengths, if len1 >len2 means str1 is greater else
if len2>len1 then str2 is greater
else the above compare is required...........
| Is This Answer Correct ? | 4 Yes | 12 No |
Post New Answer View All Answers
Is that possible to store 32768 in an int data type variable?
In a switch statement, explain what will happen if a break statement is omitted?
What is the difference between far and near in c?
What are local static variables? How can you use them?
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
Who is the founder of c language?
Write a program to reverse a given number in c?
What is malloc() function?
What is wrong in this statement?
What is the difference between malloc calloc and realloc in c?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol
What are the 5 data types?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
What are local variables c?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.