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

A square residential lot is measured to be 100 feet on each side, with a possible measurement error of 1% in each of the length and width. What is the absolute
What are some non-examples of carbohydrates
imobilizarea facuta corect si la timp poate proteja persoana accidentata ?
tell ma the answer to the correct anwser to what is unitary
How do I graph inequalities
steve has 500 more marbles than richard at first. he gives 300 marbles to richard. who has more marbles now, and by how many?
arranged from least to greatest. -6.6, 5.8, -6 3/4, 27/5, -5 5/8
What are some non-examples of carbohydrates
Do you agree with Plato's vision of the ideal state in the republic?
What factors influence how a person votes in an election?