Answered step by step
Verified Expert Solution
Question
1 Approved Answer
someone please help me with my C programing assignment Write a function, named my_strcmp, that receives two strings and performs a string comparison. Assuming strings
someone please help me with my C programing assignment
Write a function, named my_strcmp, that receives two strings and performs a string comparison. Assuming strings A and B of the same length, the function will return the following values: -1 if A precedes B alphabetically 0 if A is the same string as B 1 if A follows B alphabetically Since a string in C is a character array, your function must be written to receive two arrays (one for each string). The difference between the array in Problem #2 and this problem is that there is no need to give the function the array size because you can search for the null terminator '\0' or use strlen. For simplicity, assume each string will be single word that is the same size, for example, "car" and "cat" (returns -1), or "trash" and "speed" (returns 1)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started