Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Must be done in c. Cannot use anything except #include also cant use strcmp(), memcmp(), memcpy() and so on... no more than 30 lines of

Must be done in c. Cannot use anything except #include also cant use strcmp(), memcmp(), memcpy() and so on... no more than 30 lines of code. and no main. thank you! image text in transcribed

You are to implement a simple function with the following type declaration: int strednocase (const char *a, const char *b); Your implementation must satisfy all of the following constraints: The definition of strednocase must match the declaration above exactly. It returns 1 if and only if either (1) both a and b are equal to NULL, or (ii) neither is NULL, and each points to an array of chars (bytes) containing the same null-terminated sequence of characters, ignoring case. For example: - streqnocase ("ABC", "abc") returns 1 - streqnocase (NULL, NULL) returns 1 - streqnocase (NULL, "abc") returns 0 - strednocase ("0123$/-","0123$/-") returns 1 - strednocase ("0123$/8","0123$/!") returns 0 - streqnocase ("a555#Bd", "A555#b") returns 0 Your code must work for string arguments of arbitrary length. Your code must not make any assumptions about the input strings, except that they are null-terminated. Your code should work for string constants, which are read-only in C. Your code must not read past the null terminator of the string

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago