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