Ask Question
25 January, 09:36

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

+2
Answers (1)
  1. 25 January, 10:39
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers