Answer to Question #50602 in C++ for Umer

Question #50602
Make your own version of the library function strcmp(s1, s2), which compares two
strings and returns –1 if s1 comes first alphabetically, 0 if s1 and s2 are the same, and 1
if s2 comes first alphabetically. Call your function compstr(). It should take two char*
strings as arguments, compare them character by character, and return an int. Write a
main() program to test the function with different combinations of strings. Use pointer
notation throughout.
1
Expert's answer
2015-02-10T11:03:33-0500
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-50602.pdf

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS