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
How can you determine the maximum value that a numeric variable can hold?
Do you know null pointer?
hi, which software companys will take,if d candidate's % is jst 55%?
If I have a char * variable pointing to the name of a function ..
What is a structure in c language. how to initialise a structure in c?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
Describe the difference between = and == symbols in c programming?
diff between exptected result and requirement?
differentiate built-in functions and user – defined functions.
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
When was c language developed?
Tell me the use of bit field in c language?
What are control structures? What are the different types?
Explain two-dimensional array.
Why do we use int main instead of void main in c?