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

a document that tracks a company's income and expenses is referred to as
Please help me figure this out! God bless you <3
what is the volume? -geometry
What is 2.53 rounded to the nearest whole number
I really need som help I’m about to have a brain attack
How did the Zhou justify their overthrow of the Shang dynasty?
What does the variable r represent in the equation 10r+4=8
The scale drawing of a building has a width of 3 inches and a height of 5 inches. If the width of the actual building is 36 feet, what is the height?
A recipe calls for 5 cans of corn to serve 4 people. If Jack is planning to serve a crowd of 10 people, how many cans of corn should he purchase? A. 2 cans B.
HELP PLS!!! WILL MARK BRAINLIEST!! 40 POINTS!!! IF STEALING POINTS WILL REPORT!! What is the moral of “Hofus the Stone Cutter”? Use details from the text to sup