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

who is the only person who can authenicate the information in a patients medical record
The author most likely uses the word "scheme" to
When the supplies are limited what happens to the prices
The declaration of independence described
Explain how you can use the graph of the quadratic function f(x) to solve the equation f(x)=0
what is the value of f(x) = 9x when x = -2?
if the equation created will have no solution, one solution, or infinitely many solutions
The length of a rectangle is 9 ft longer than twice the width. If the perimeter is 108 ft, find the length and the width of the rectangle
How many moles of water, H2O, contain 2.0×1022 molecules of water? (See the hints for assistance in interpreting scientific notation.)
The period of a wave is found to be 50 seconds. What is the frequency of the wave?