Question: C programming (10 pts) Write a function called stringLen which accepts two arguments. Each argument contains the address of the first character of a character

C programming
 C programming (10 pts) Write a function called stringLen which accepts

(10 pts) Write a function called stringLen which accepts two arguments. Each argument contains the address of the first character of a character string. Your function must return t length of one of those strings if the strings pointed to by the two arguments are exactly the same length and contain exactly the same characters,-1 otherwise. same lengeth and contain exactly the same characters;-1 otherwise. 7. cter string. Your function must return the Examples: hello Return 5 because the lengths and all characters are the same "hello" "hello world" "hello"Return-1 because the lengtlis are different "xyzyx""xyyyx"Return -1 because a character in the two equal-length strings is different

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!