cruzmiguel7108 cruzmiguel7108
  • 03-07-2021
  • Computers and Technology
contestada

The part (or statement) of a recursive function that decides whether the recursive loop is terminated is called: (Select all that apply)

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 04-07-2021

Answer:

The base case

Explanation:

Required

The part that determines the termination of a recursion

This part of a recursion is referred to as the base case.

Take for instance, the following:

factorial(int n) {

   if (n < = 1) {         return 1; }

   else {             return n*factorial(n-1);    }  }

The base case of the above is     if (n < = 1) {         return 1; }

Because the recursion will continue to be executed until the condition is true i.e. n less than or equals 1

Answer Link

Otras preguntas

25 POINTS!!!!!!! Tamar was waiting anxiously for Jackson to arrive home. ______, Jackson was delayed by heavy traffic. A. Afterward B. Therefore C. Meanwhile D.
Why might a desert animal have longer loops of henle than an aquatic one?
Help with 12 please 15POINTS ‼️
Capital of Yugoslavia
Find the perimeter of the triangle shown ( need fast)
Check if I'm right? When the river levels began to rise, the townspeople quickly built a _______ to keep their homes from flooding. citadel mettle stalwart
Nine less than twice a number is thirty one
On his first three tests, Alan scored 76, 89, and 92. What score must he get on his fourth test to have an average of 80 for all four tests?
Which of the following is NOT a unit used to measure temperature? Question 20 options: Kelvin Watt Celsius Fahrenheit
Is Change good or bad and why?