I need to wright my won strcmp function. so i need to know how strcmp works.
Printable View
I need to wright my won strcmp function. so i need to know how strcmp works.
How do you think it works?
It takes two strings and compares them by each element. If the string matches, it gives a certain value, if it doesn't match it gives a different value.
Look up "strcmp() in c" it will give more details.
what is that value? how it is assigned? and how it is calculated?
Obviously, you would loop over the two strings. I suggest that you venture an answer yourself. If you want spoonfeeding for this one, then I might as well write the function for you, and that will spoil your fun.Quote:
Originally Posted by sagar474
We've all done this exercise before. Now it's your turn.
Quzah.