Question: Question 3 [10 marks] int strcmp( const char s1, const char s2 ); (String Compare) function is a useful function in C to compare if

 Question 3 [10 marks] int strcmp( const char s1, const char

Question 3 [10 marks] int strcmp( const char s1, const char "s2 ); (String Compare) function is a useful function in C to compare if the characters within 8 are equal to, larger, or smaller in ASCII value to a second string. The function prototype shown above. The function returns 0 if both strings are equal, -1 if s1 one strin S2. Re-write you function. Yo r own version of strcmp below while preserving the same functionality of the original u may assume that all string inputs to the function are properly terminated with a null character (10'), and that the ASCI value of the null character is smaller than any other character. int strcmp( const char 's1, const char "s2 )I

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 Databases Questions!