Question: 4. Write a function named findLastCharacter that takes a C-string and a character as arguments and returns the last index of the character in the

4. Write a function named findLastCharacter that takes a C-string and a character as arguments and returns the last index of the character in the C-string if the character is found in the C-string; otherwise returns -1. For example, if char S[ ] = "massachusettes"; and char chl = 's', ch2 = 'c'; then The function call findLastCharacter(S, ch1) must return 14. The function call findLastCharacter(S, ch2) must return 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
