ferjulyerly7id ferjulyerly7id
  • 12-12-2016
  • Computers and Technology
contestada

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

Respuesta :

rsmith6559
rsmith6559 rsmith6559
  • 21-12-2016
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.
Answer Link

Otras preguntas

Can’t stop the feeling by Justin Timberlake. What message is the song trying to tell the listener?
Need help ASAP! Will give brainliest;) No links please, will report. The area of a triangle is 55x^3+15x^2-25. The length of the triangle is 5x. What is the wi
Which of the following would NOT have been used in a Cold War? a propaganda b threats of violence c guns, bombs, etc. d espionage (spying) tactics
Cierto o Falso: people from Spain are not from Latin America, Cierto Falso
write the first six cube if natural number​
Choose the correct possessive adjective to fill in the blank. Watch agreement of gender and number. ¿Debo estudiar mis apuntes? Sí, debes estudiar ____ apuntes.
30 points have a good day
Is the ratio 15:12 equivalent to these? Explain your reasoning.
in 450 BCE how did the Athenian Empire collapse​​
A. 110 B. 50 pls help asap !!!!!