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
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
Get step-by-step solutions from verified subject matter experts
