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

At the beginning of the presentation, trevor said, “ladies, do you have problems getting your boyfriend to watch something other than football
Which diagnostic technique is used to detect cancer and osteomyelitis?
The average management fee for all mutual funds is: A. less than 0.25%. B. 0.25% to 0.50%. C. 0.50 to 1.25%. D. 1.25 to 2.50%.
In the "Universal Declaration of Human Rights," what is essential to protect human rights through law? a. legal recourse b. faith c. fear d. rebellion
Script kiddies acquire which item below from other attackers to easily craft an attack
Writing a strong lead for an essay about your favorite television show. Use at least two adjectives
what is two thirds of 72
Rectangular box a has a greater volume than rectangular box and b but the length of box a is less than the length of box b. how is this possible?
how does the quote “When the character of a person is not clear to you, look at his or her friends” relate to the concept of integrity
As London describes it in "To Build a Fire,"what does the arctic represent? a)total chaos b) total order c) a place of tension between order and chaos