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

Decide whether the sentence is clear or has an unclear, missing, or confusing antecedent. Then choose the label that best describes the antecedent. The clear bl
What are elie's thoughts about god at this point book. Night
What is one difference between a primary oocyte and a secondary oocyte in humans?
explain 2 ways to evaluate 15(90-3)
Which of the following is true for the graph of the quadratic function f(x)=2x^2-10x+12 A. The vertex of the function is the point (5/2), (-1/2) B. The y-in
increase 12 1/2 cm by 25 mm
What were citizens of the polis expected to do? A. fight to defend the polis B. elect representatives to the assembly C. set up schools for all people D. o
Caitlin has 4 3/4 pounds of clay . She uses 1 1/10 pounds to make a cup ,and another 2 pounds to make a jar , how many pounds are left write an equation
7. The Preamble of the Constitution of the United States clearly states that the source of governmental authority is which of the following? Local governments
The celebration of Kwanzaa was meant to