Ask Question
25 February, 02:35

Write a recursive, int - valued function, len, that accepts a string and returns the number of characters in the string.

+5
Answers (1)
  1. 25 February, 05:17
    0
    Without knowing the language, it's pretty imposible to write it. Once you start thinking recursively, it's not a difficult problem.

    While you're recursing, pass the string without the first character.

    The base case would be a null string which would return 0.

    The unwind would just add one and return that.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a recursive, int - valued function, len, that accepts a string and returns the number of characters in the string. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers