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

What does the color of a star determine
The process of spreading culture traits from one society to another.
He took the bad news with surprising 1.witheredness 2.pavilion 3.detachedness 4.resignation and showed no emotion
Most of the ATP made during cellular respiration is produced in which organelle?
speed or velocity are more helpful to a pilot why
Which event marks the climax in "The Glass of Milk"? a. The boy refuses the sailor's offer of food. b. The boy falls asleep facing the sea. c. The boy takes
Ollowing the terror attacks on 9/11, the ______ was passed to help prevent terrorist attacks. Select one: a. Patriot Act b. Retaliation Act c. Terrorist Act (IN
what kind of relationship would a mouse and a rabbit have
If p=5 what is the value of 6p-4?
Nobody really knows how Africans were treated on board slave ships. true or false