Question: C programming Write a function called stringLen which accepts two arguments. Each argument contains the address of the first character string. Your function must return

C programming  C programming Write a function called stringLen which accepts two arguments.

Write a function called stringLen which accepts two arguments. Each argument contains the address of the first character string. Your function must return the 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. Examples: "hello" "hello" Return 5 because the lengths and all characters are the same "hello world" "hello"Return-1 because the lengths 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!