Question: language is in C Exercise 3.29. Implement the following specification: /* Compares stri and str2 according to dictionary (aka, * lexicographic) order, where characters are


language is in C
Exercise 3.29. Implement the following specification: /* Compares stri and str2 according to "dictionary" (aka, * "lexicographic") order, where characters are ordered by * their ASCII values. Returns -1 if str1 comes before * str2; 0 if either stri or str 2 is NULL or if they are 5 * equal; and 1 if stri comes after str2. M */ 7 int strcmp (char * stri, char * str2); For example, consider the following unit test in strcmp_test.c: 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
