gqbbyd4630 gqbbyd4630
  • 11-12-2018
  • Computers and Technology
contestada

If you create and invoke a recursive function without accounting for a base case, what can go wrong?

Respuesta :

tonb
tonb tonb
  • 11-12-2018

Every recursive function should have an exit criterion (=handling the base case) to exit the recursion.

Without it, it wil recurse forever, until system resources run out (typically the call stack will overflow and your program will crash).

Answer Link

Otras preguntas

what kind of orbit in which the satellite stays in the same location in the sky
In which sentence does the verb agree with the subject? A. Is your parents coming to the baseball game? B. Have the neighbors eaten dinner yet? C. Do Bailey hav
Why does ice stay at the top of oceans instead of sinking to the bottom? Ice is colder than liquid water. Ice is warmer than liquid water. Ice is more dense tha
An article about teenagers needing to earn the respect of adult community members recently appeared in your local newspaper. It focused on the fact that fewer a
* Discuss the impact of netbooks, e-book readers and other digital devices on the way students learn.
What is a long speech by one character not interrupted by conversation called? A. Aside B. Cue C. Monologue D. Throwaway
Where can the majority of earths freshwater be found
Why do some people believe the human eye is an example of why evolution cant be true?
Explain the role of RNA polymerase in mRNA sythesis
If you are diagnosed with a viral infection, such as the flu, would your doctor prescribe antibiotics for you? Explain your answer.