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

The sum of Andre and Brandons scores on a math quiz is 180. Andres score is 2 times as much as 30 less than Brandons score. Find each students quiz score.
The "A" in ACL stands for
Most new workers in the labor force are men true or false?
491,852 people went to the water park in the month of July . Round this number to the nearest hundred thousand to estimate how many people went to the park . Us
why did the Crown pass so-called Intolerable Acts
Why did the British army March on Lexington and concord?
During the 1920s, people would buy stock on margin, which meant that they
unemployment is an example of which of the following? A.inflation risk B.personal risk C.income risk D.intrest risk
2. What are three other ways you can reinforce your message when you’re saying no?
What features of big cities appealed to immigrants