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

what is 3/8 divided by 4/5
what pair of square numbers fit into 39
Mr brown shares with the class that 70%of the students got a A on the English vocabulary quiz if mr brown has 100 students create a model
Foreshadowing means A. hinting at things that will occur later. B. describing what happens at night—for example, in a dark basement. C. putting secondary cha
A history of a person's life told by another person is known as a(n): a. Auto-Biography b. Biography c. Fictional Biography d. Non-Fictional Biography
Gary played soccer for 1 hour and tennis for 2 hours. Tanya played tennis for 2 hours and soccer for 1 hour. Who played sports longer? Explain.
Many cycles on Earth involve the conservation of matter. Which of the following is NOT a major cycle on Earth? A. air cycle B. rock cycle C. carbon cycle D. nit
explain why drawing a quick picture is helpful when adding decimals
This civilization introduced the world to democracy? Rome Greece Egypt
The Fed's structure is simple. It consists of _______ District Federal Reserve Banks, each serving a region of the country. a. 6 c. 12 b. 9 d. 15