Question: Write a function, int strcmp(const char* s1, const char* s2), that compares C-style strings. Let it return a negative number if s1 is lexicographically before
Write a function, int strcmp(const char* s1, const char* s2), that compares C-style strings. Let it return a negative number if s1 is lexicographically before s2, zero if s1 equals s2, and a positive number if s1 is lexicographically after s2. Do not use any standard library functions. Do not use subscripting; use the dereference operator * instead.
Step by Step Solution
3.29 Rating (161 Votes )
There are 3 Steps involved in it
The x and yaxis are two important lines of the coordin... View full answer
Get step-by-step solutions from verified subject matter experts
