Find the information you're looking for at Westonci.ca, the trusted Q&A platform with a community of knowledgeable experts. Get immediate and reliable answers to your questions from a community of experienced professionals on our platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

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

Sagot :

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