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

Factored completely the expression 2y^2 + 12y- 54 is equivalent to
Solve for the variable a in this equation: c = 8πab
The leg of a right triangle are 3 units and 10 units. What is the length of the hypotenuse? Round your answer to the nearest hundredth
what does a "real thoroughbred mean"?
What is the primary source of energy that generates most ocean waves
if i bottle flip a bottle 17 times and there is a ratio of 2 to 3 of it landing how many times will it land
if y is 2.5 when x is 5 and y varies directly with x, find y when x is 10
Which of the following graphs shows the graph of this equation Y+1=2 (x-1)
Which of the following were territories gained by the United States during the Spanish-American War? A. Mexico, the Philippines, Bermuda B. Guam, Florida, Cuba
How do you diagram this sentence?