Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AutoCAD Database Connectivity

Authors: Scott McFarlane

1st Edition

0766816400, 978-0766816404

More Books

Students also viewed these Databases questions

Question

=+ If strikes occur, are they legally regulated?

Answered: 1 week ago

Question

=+industrial action Under what circumstances can unions strike?

Answered: 1 week ago

Question

=+What forms of industrial action are common?

Answered: 1 week ago