Question: Write your own C-string compare function. It should have the following signature and return 0 if the strings are equivalent, and any nonzero integer if
Write your own C-string compare function. It should have the following signature and return 0 if the strings are equivalent, and any nonzero integer if they are different. You can assume that the
pointers passed to it are pointers to valid, null- terminated C-Strings.
For this exercise, you may not use the strcmp() function.
int stringCompare(char *s1, char *s2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
