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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!